summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/usb/ohci.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 5c603779125..12b65af3fba 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.41 2004/07/11 05:29:16 deraadt Exp $ */
+/* $OpenBSD: ohci.c,v 1.42 2004/08/11 04:01:41 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 $ */
@@ -1335,17 +1335,19 @@ ohci_softintr(void *v)
/* Handled by abort routine. */
continue;
}
+
+ 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;
+
usb_uncallout(xfer->timeout_handle, ohci_timeout, xfer);
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();