Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/dev/usb Pull up revision 1.141 (requested by bad in...



details:   https://anonhg.NetBSD.org/src/rev/8e534ab6289f
branches:  netbsd-1-6
changeset: 530851:8e534ab6289f
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Oct 10 17:58:41 2003 +0000

description:
Pull up revision 1.141 (requested by bad in ticket #1515):
Update actlen even in the case where a TD returns an error -- this is critical
for the umass bulk-only STALL case.

diffstat:

 sys/dev/usb/ohci.c |  22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diffs (45 lines):

diff -r df3e0159753d -r 8e534ab6289f sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Sun Oct 05 13:03:08 2003 +0000
+++ b/sys/dev/usb/ohci.c        Fri Oct 10 17:58:41 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.123.2.1 2003/01/27 06:00:12 jmc Exp $       */
+/*     $NetBSD: ohci.c,v 1.123.2.2 2003/10/10 17:58:41 tron Exp $      */
 /*     $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $       */
 
 /*
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.123.2.1 2003/01/27 06:00:12 jmc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.123.2.2 2003/10/10 17:58:41 tron Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1323,16 +1323,18 @@
                        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();



Home | Main Index | Thread Index | Old Index