diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2004-08-11 04:12:44 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2004-08-11 04:12:44 +0000 |
commit | 5440b90de0f61c880e4cbf254074ab2768700754 (patch) | |
tree | 93b8f690efd46229e7763220661e9a5126d2acbc /sys | |
parent | 3b5a921823d712d24ec449ce6cb9b617fe6d2858 (diff) |
from netbsd, ohci.c 1.140, 1.143, 1.148, 1.149, 1.150
log message for 1.140:
Function names printed in debug messages did not always match the
actual name of the function.
log message for 1.143:
Remove assigned-to but otherwise unused variables.
Remove unreachable break after return statements.
log message for 1.148:
Adjust a couple of comments to make it clear WTF is going on.
log message for 1.149:
Make one message dependent on ohcidebug, so it doesn't interfere with polled
operation; e.g. when entering a root device or in DDB.
log message for 1.150:
Fix an error in a printf() format.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/ohci.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 9b7aa6dd913..36320e40f0b 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci.c,v 1.45 2004/08/11 04:07:04 dlg Exp $ */ +/* $OpenBSD: ohci.c,v 1.46 2004/08/11 04:12:43 dlg Exp $ */ /* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ @@ -350,7 +350,6 @@ ohci_activate(device_ptr_t self, enum devact act) switch (act) { case DVACT_ACTIVATE: return (EOPNOTSUPP); - break; case DVACT_DEACTIVATE: if (sc->sc_child != NULL) @@ -1094,7 +1093,8 @@ ohci_intr(void *p) static struct timeval ohci_intr_tv; if ((OREAD4(sc, OHCI_INTERRUPT_STATUS) & sc->sc_eintrs) && usbd_ratecheck(&ohci_intr_tv)) - printf("ohci_intr: ignored interrupt while polling\n"); + DPRINTFN(16, + ("ohci_intr: ignored interrupt while polling\n")); #endif return (0); } @@ -1476,11 +1476,11 @@ ohci_softintr(void *v) void ohci_device_ctrl_done(usbd_xfer_handle xfer) { - DPRINTFN(10,("ohci_ctrl_done: xfer=%p\n", xfer)); + DPRINTFN(10,("ohci_device_ctrl_done: xfer=%p\n", xfer)); #ifdef DIAGNOSTIC if (!(xfer->rqflags & URQ_REQUEST)) { - panic("ohci_ctrl_done: not a request"); + panic("ohci_device_ctrl_done: not a request"); } #endif } @@ -1494,8 +1494,8 @@ ohci_device_intr_done(usbd_xfer_handle xfer) ohci_soft_td_t *data, *tail; - DPRINTFN(10,("ohci_intr_done: xfer=%p, actlen=%d\n", - xfer, xfer->actlen)); + DPRINTFN(10, ("ohci_device_intr_done: xfer=%p, actlen=%d\n", xfer, + xfer->actlen)); if (xfer->pipe->repeat) { data = opipe->tail.td; @@ -1530,15 +1530,14 @@ ohci_device_intr_done(usbd_xfer_handle xfer) void ohci_device_bulk_done(usbd_xfer_handle xfer) { - DPRINTFN(10,("ohci_bulk_done: xfer=%p, actlen=%d\n", - xfer, xfer->actlen)); + DPRINTFN(10, ("ohci_device_bulk_done: xfer=%p, actlen=%d\n", xfer, + xfer->actlen)); } void ohci_rhsc(ohci_softc_t *sc, usbd_xfer_handle xfer) { usbd_pipe_handle pipe; - struct ohci_pipe *opipe; u_char *p; int i, m; int hstatus; @@ -1553,7 +1552,6 @@ ohci_rhsc(ohci_softc_t *sc, usbd_xfer_handle xfer) } pipe = xfer->pipe; - opipe = (struct ohci_pipe *)pipe; p = KERNADDR(&xfer->dmabuf, 0); m = min(sc->sc_noport, xfer->length * 8 - 1); @@ -1675,7 +1673,8 @@ ohci_device_request(usbd_xfer_handle xfer) sed = opipe->sed; opipe->u.ctl.length = len; - /* Update device address and length since they may have changed. */ + /* Update device address and length since they may have changed + during the setup of the control pipe in usbd_new_device(). */ /* XXX This only needs to be done once, but it's too early in open. */ /* XXXX Should not touch ED here! */ sed->ed.ed_flags = htole32( @@ -2245,7 +2244,7 @@ ohci_abort_xfer(usbd_xfer_handle xfer, usbd_status status) } /* Zap headp register if hardware pointed inside the xfer. */ if (hit) { - DPRINTFN(1,("ohci_abort_xfer: set hd=0x08%x, tl=0x%08x\n", + DPRINTFN(1,("ohci_abort_xfer: set hd=0x%08x, tl=0x%08x\n", (int)p->physaddr, (int)le32toh(sed->ed.ed_tailp))); sed->ed.ed_headp = htole32(p->physaddr); /* unlink TDs */ } else { |