diff options
-rw-r--r-- | sys/dev/usb/ohci.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 11128e3..2dd5f73 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -2,6 +2,7 @@ /* Also, already ported: * $NetBSD: ohci.c,v 1.140 2003/05/13 04:42:00 gson Exp $ + * $NetBSD: ohci.c,v 1.141 2003/09/10 20:08:29 mycroft Exp $ */ #include <sys/cdefs.h> @@ -1382,16 +1383,18 @@ ohci_softintr(void *v) continue; } usb_uncallout(xfer->timeout_handle, ohci_timeout, xfer); + + len = std->len; + if (std->td.td_cbp != 0) + len -= le32toh(std->td.td_be) - + le32toh(std->td.td_cbp) + 1; + DPRINTFN(10, ("ohci_process_done: len=%d, flags=0x%x\n", len, + std->flags)); + if (std->flags & OHCI_ADD_LEN) + xfer->actlen += len; + cc = OHCI_TD_GET_CC(le32toh(std->td.td_flags)); if (cc == OHCI_CC_NO_ERROR) { - len = std->len; - if (std->td.td_cbp != 0) - len -= le32toh(std->td.td_be) - - le32toh(std->td.td_cbp) + 1; - DPRINTFN(10, ("ohci_process_done: len=%d, flags=0x%x\n", - len, std->flags)); - if (std->flags & OHCI_ADD_LEN) - xfer->actlen += len; if (std->flags & OHCI_CALL_DONE) { xfer->status = USBD_NORMAL_COMPLETION; s = splusb(); |