Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Fix typos in my last commit that caused the driv...



details:   https://anonhg.NetBSD.org/src/rev/f28bd24a1377
branches:  trunk
changeset: 482834:f28bd24a1377
user:      augustss <augustss%NetBSD.org@localhost>
date:      Tue Feb 22 22:59:49 2000 +0000

description:
Fix typos in my last commit that caused the driver to panic.
Change some (unrelated) debug messages.

diffstat:

 sys/dev/usb/ohci.c |  27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diffs (91 lines):

diff -r 56f0619e9b67 -r f28bd24a1377 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Tue Feb 22 22:46:16 2000 +0000
+++ b/sys/dev/usb/ohci.c        Tue Feb 22 22:59:49 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.72 2000/02/22 11:30:54 augustss Exp $       */
+/*     $NetBSD: ohci.c,v 1.73 2000/02/22 22:59:49 augustss Exp $       */
 /*     $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $       */
 
 /*
@@ -262,8 +262,8 @@
 
 static struct usbd_bus_methods ohci_bus_methods = {
        ohci_open,
+       ohci_softintr,
        ohci_poll,
-       ohci_softintr,
        ohci_allocm,
        ohci_freem,
        ohci_allocx,
@@ -637,6 +637,7 @@
 
        SIMPLEQ_INIT(&sc->sc_free_xfers);
 
+       /* XXX determine alignment by R/W */
        /* Allocate the HCCA area. */
        err = usb_allocmem(&sc->sc_bus, OHCI_HCCA_SIZE, 
                         OHCI_HCCA_ALIGN, &sc->sc_hccadma);
@@ -698,6 +699,17 @@
                sc->sc_hcca->hcca_interrupt_table[revbits[i]] = 
                        LE(sc->sc_eds[OHCI_NO_EDS-OHCI_NO_INTRS+i]->physaddr);
 
+#ifdef OHCI_DEBUG
+       if (ohcidebug > 15) {
+               for (i = 0; i < OHCI_NO_EDS; i++) {
+                       printf("ed#%d ", i);
+                       ohci_dump_ed(sc->sc_eds[i]);
+               }
+               printf("iso ");
+               ohci_dump_ed(sc->sc_isoc_head);
+       }
+#endif
+
        /* Determine in what context we are running. */
        ctl = OREAD4(sc, OHCI_CONTROL);
        if (ctl & OHCI_IR) {
@@ -1008,7 +1020,7 @@
 
        sc->sc_bus.intr_context++;
        sc->sc_bus.no_intrs++;
-       DPRINTFN(7, ("ohci_intr: sc=%p intrs=%x(%x) eintr=%x\n", 
+       DPRINTFN(7, ("ohci_intr: sc=%p intrs=0x%x(0x%x) eintrs=0x%x\n", 
                     sc, (u_int)intrs, OREAD4(sc, OHCI_INTERRUPT_STATUS),
                     (u_int)eintrs));
 
@@ -1018,7 +1030,7 @@
                intrs &= ~OHCI_SO;
        }
        if (eintrs & OHCI_WDH) {
-               done &= OHCI_DONE_INTRS;
+               done &= ~OHCI_DONE_INTRS;
                if (sc->sc_done == 0)
                        sc->sc_done = done;
                else {
@@ -1028,7 +1040,7 @@
 
                        for (ldone = sc->sc_done; ldone != 0; 
                             ldone = LE(std->td.td_nexttd))
-                               std = ohci_hash_find_td(sc, done);
+                               std = ohci_hash_find_td(sc, ldone);
                        std->td.td_nexttd = LE(done);
                }
                sc->sc_hcca->hcca_done_head = 0;
@@ -1635,8 +1647,8 @@
 ohci_dump_ed(sed)
        ohci_soft_ed_t *sed;
 {
-       DPRINTF(("ED(%p) at %08lx: addr=%d endpt=%d maxp=%d %b\ntailp=0x%08lx "
-                "headp=%b nexted=0x%08lx\n",
+       DPRINTF(("ED(%p) at 0x%08lx: addr=%d endpt=%d maxp=%d %b\ntailp=0x%08lx "
+                "headflags=%b headp=0x%08lx nexted=0x%08lx\n",
                 sed, (u_long)sed->physaddr, 
                 OHCI_ED_GET_FA(LE(sed->ed.ed_flags)),
                 OHCI_ED_GET_EN(LE(sed->ed.ed_flags)),
@@ -1646,6 +1658,7 @@
                 (u_long)LE(sed->ed.ed_tailp),
                 (u_long)LE(sed->ed.ed_headp),
                 "\20\1HALT\2CARRY",
+                (u_long)LE(sed->ed.ed_headp),
                 (u_long)LE(sed->ed.ed_nexted)));
 }
 #endif



Home | Main Index | Thread Index | Old Index