summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2003-11-10 00:12:39 +0000
committerjoe <joe@FreeBSD.org>2003-11-10 00:12:39 +0000
commit9313579fa79fc32678d6211be92c27b5f54a4714 (patch)
tree3b832f5553d7a54fa800c301d8238d1bd0bd4e35
parente5da636735e4c89ec3568ea66dbd3301112845e3 (diff)
downloadFreeBSD-src-9313579fa79fc32678d6211be92c27b5f54a4714.zip
FreeBSD-src-9313579fa79fc32678d6211be92c27b5f54a4714.tar.gz
MFNetBSD:
revision 1.141 date: 2003/09/10 20:08:29; author: mycroft; Update actlen even in the case where a TD returns an error -- this is critical for the umass bulk-only STALL case.
-rw-r--r--sys/dev/usb/ohci.c19
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();
OpenPOWER on IntegriCloud