summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2004-08-11 04:01:42 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2004-08-11 04:01:42 +0000
commitb44fa289544e62905e4b3bb511273a88990bf541 (patch)
tree1208a79e551041e507df66e9d5d4aba882f52a74 /sys/dev
parent83121d59dd9a24a87c41f5c9fde15221fceb26a7 (diff)
from netbsd, ohci.c 1.141
Update actlen even in the case where a TD returns an error -- this is critical for the umass bulk-only STALL case.
Diffstat (limited to 'sys/dev')
-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();