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.
This commit is contained in:
joe 2003-11-10 00:12:39 +00:00
parent e21e0d27be
commit c79031811b

View File

@ -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();