I find the aliasing of -110 for upper-level timeouts and the loss of
token unfortunate and pointless. I would prefer to be able to distinguish
these situation when reading user-submitted dmesg outputs.

I looked at the way we handle those errors, and it seems like there
isn't going to be much harm from letting it to fall through on the
default handling. I only tuned HID because that thing was historically
sensitive.

What do you think?

-- Pete

diff -urp -X dontdiff linux-2.6.18-rc1/Documentation/usb/error-codes.txt 
linux-2.6.18-rc1-lem/Documentation/usb/error-codes.txt
--- linux-2.6.18-rc1/Documentation/usb/error-codes.txt  2006-01-03 
20:02:53.000000000 -0800
+++ linux-2.6.18-rc1-lem/Documentation/usb/error-codes.txt      2006-07-25 
12:56:52.000000000 -0700
@@ -98,13 +98,13 @@ one or more packets could finish before 
                        error, a failure to respond (often caused by
                        device disconnect), or some other fault.
 
--ETIMEDOUT (**)                No response packet received within the 
prescribed
+-ETIME (**)            No response packet received within the prescribed
                        bus turn-around time.  This error may instead be
                        reported as -EPROTO or -EILSEQ.
 
-                       Note that the synchronous USB message functions
-                       also use this code to indicate timeout expired
-                       before the transfer completed.
+-ETIMEDOUT             Synchronous USB message functions use this code
+                       to indicate timeout expired before the transfer
+                       completed.
 
 -EPIPE (**)            Endpoint stalled.  For non-control endpoints,
                        reset this status with usb_clear_halt().
diff -urp -X dontdiff linux-2.6.18-rc1/drivers/usb/host/isp116x.h 
linux-2.6.18-rc1-lem/drivers/usb/host/isp116x.h
--- linux-2.6.18-rc1/drivers/usb/host/isp116x.h 2006-03-27 07:45:22.000000000 
-0800
+++ linux-2.6.18-rc1-lem/drivers/usb/host/isp116x.h     2006-07-25 
12:48:39.000000000 -0700
@@ -233,7 +233,7 @@ static const int cc_to_error[16] = {
        /* Bit Stuff  */ -EPROTO,
        /* Data Togg  */ -EILSEQ,
        /* Stall      */ -EPIPE,
-       /* DevNotResp */ -ETIMEDOUT,
+       /* DevNotResp */ -ETIME,
        /* PIDCheck   */ -EPROTO,
        /* UnExpPID   */ -EPROTO,
        /* DataOver   */ -EOVERFLOW,
diff -urp -X dontdiff linux-2.6.18-rc1/drivers/usb/host/ohci.h 
linux-2.6.18-rc1-lem/drivers/usb/host/ohci.h
--- linux-2.6.18-rc1/drivers/usb/host/ohci.h    2006-01-03 20:03:35.000000000 
-0800
+++ linux-2.6.18-rc1-lem/drivers/usb/host/ohci.h        2006-07-25 
12:48:12.000000000 -0700
@@ -159,7 +159,7 @@ static const int cc_to_error [16] = { 
        /* Bit Stuff  */               -EPROTO,
        /* Data Togg  */               -EILSEQ,
        /* Stall      */               -EPIPE,
-       /* DevNotResp */               -ETIMEDOUT,
+       /* DevNotResp */               -ETIME,
        /* PIDCheck   */               -EPROTO,
        /* UnExpPID   */               -EPROTO,
        /* DataOver   */               -EOVERFLOW,
diff -urp -X dontdiff linux-2.6.18-rc1/drivers/usb/input/hid-core.c 
linux-2.6.18-rc1-lem/drivers/usb/input/hid-core.c
--- linux-2.6.18-rc1/drivers/usb/input/hid-core.c       2006-07-09 
17:54:36.000000000 -0700
+++ linux-2.6.18-rc1-lem/drivers/usb/input/hid-core.c   2006-07-25 
12:57:51.000000000 -0700
@@ -1023,6 +1023,7 @@ static void hid_irq_in(struct urb *urb, 
                        return;
                case -EILSEQ:           /* protocol error or unplug */
                case -EPROTO:           /* protocol error or unplug */
+               case -ETIME:            /* protocol error or unplug */
                case -ETIMEDOUT:        /* NAK */
                        clear_bit(HID_IN_RUNNING, &hid->iofl);
                        hid_io_error(hid);

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to