Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Generate a diagnistic dump on "Host Controller H...



details:   https://anonhg.NetBSD.org/src/rev/2c3e92cdfd83
branches:  trunk
changeset: 484891:2c3e92cdfd83
user:      augustss <augustss%NetBSD.org@localhost>
date:      Fri Apr 14 14:11:36 2000 +0000

description:
Generate a diagnistic dump on "Host Controller Halted".

diffstat:

 sys/dev/usb/uhci.c |  25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diffs (65 lines):

diff -r 55cc50211165 -r 2c3e92cdfd83 sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Fri Apr 14 13:41:24 2000 +0000
+++ b/sys/dev/usb/uhci.c        Fri Apr 14 14:11:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhci.c,v 1.109 2000/04/06 23:44:20 augustss Exp $      */
+/*     $NetBSD: uhci.c,v 1.110 2000/04/14 14:11:36 augustss Exp $      */
 /*     $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $       */
 
 /*
@@ -251,12 +251,14 @@
     __P((uhci_soft_qh_t *, uhci_soft_qh_t *));
 
 #ifdef UHCI_DEBUG
+Static void            uhci_dump_all __P((uhci_softc_t *));
 Static void            uhci_dumpregs __P((uhci_softc_t *));
 Static void            uhci_dump_qhs __P((uhci_soft_qh_t *));
 Static void            uhci_dump_qh __P((uhci_soft_qh_t *));
 Static void            uhci_dump_tds __P((uhci_soft_td_t *));
 Static void            uhci_dump_td __P((uhci_soft_td_t *));
 Static void            uhci_dump_ii __P((uhci_intr_info_t *ii));
+Static void            uhci_dump __P((void));
 #endif
 
 #define UWRITE1(sc, r, x) bus_space_write_1((sc)->iot, (sc)->ioh, (r), (x))
@@ -770,18 +772,23 @@
 }
 
 
-#if 0
+#if 1
 void
 uhci_dump()
 {
-       uhci_softc_t *sc = thesc;
-
+       uhci_dump_all(thesc);
+}
+#endif
+
+void
+uhci_dump_all(sc)
+       uhci_softc_t *sc;
+{
        uhci_dumpregs(sc);
        printf("intrs=%d\n", sc->sc_bus.no_intrs);
-       printf("framelist[i].link = %08x\n", sc->sc_framelist[0].link);
-       uhci_dump_qh(sc->sc_ctl_start->qh.hlink);
+       /*printf("framelist[i].link = %08x\n", sc->sc_framelist[0].link);*/
+       uhci_dump_qh(sc->sc_ctl_start);
 }
-#endif
 
 
 void
@@ -1062,6 +1069,10 @@
                printf("%s: host controller halted\n", 
                       USBDEVNAME(sc->sc_bus.bdev));
                sc->sc_dying = 1;
+#ifdef UHCI_DEBUG
+               uhci_dump_all(sc);
+#endif
+
        }
 
        if (ack)        /* acknowledge the ints */



Home | Main Index | Thread Index | Old Index