On Tue, 25 Jul 2006 16:30:20 -0400 (EDT), Alan Stern <[EMAIL PROTECTED]> wrote:

> Did you check for any places where ETIMEDOUT actually should be changed to
> ETIME (or removed)?  I know usb-storage is an example.

I did not do an exhaustive search. I saw the place you mention in
transport.c, however I have one little personal problem there, an
unfinished business. Remember those toggles? Well, we abandoned my
idea of clearing them preventively, but now we (RHEL 4) clear them
as part of the recovery. I'm still thinking if I should push this
on you & Matt, so I didn't touch it. I have this patch for now:

diff -urp -X dontdiff linux-2.6.18-rc1/drivers/usb/storage/transport.c 
linux-2.6.18-rc1-lem/drivers/usb/storage/transport.c
--- linux-2.6.18-rc1/drivers/usb/storage/transport.c    2006-07-09 
17:54:37.000000000 -0700
+++ linux-2.6.18-rc1-lem/drivers/usb/storage/transport.c        2006-07-09 
20:12:16.000000000 -0700
@@ -296,7 +296,17 @@ static int interpret_urb_result(struct u
 
        /* timeout or excessively long NAK */
        case -ETIMEDOUT:
-               US_DEBUGP("-- timeout or NAK\n");
+               if (usb_pipecontrol(pipe)) {
+                       US_DEBUGP("-- timeout or NAK on control pipe\n");
+                       return USB_STOR_XFER_ERROR;
+               }
+               /*
+                * A timeout could have happened becasue we reloaded and
+                * inherited a nonzero toggle. And there is no way to know!
+                * We clear and hope for the best. Bugs 129165, 160308.
+                */
+               US_DEBUGP("clearing after halt for pipe 0x%x\n", pipe);
+               usb_stor_clear_halt(us, pipe);
                return USB_STOR_XFER_ERROR;
 
        /* babble - the device tried to send more than we wanted to read */

As see, this makes this check meaningful. I need to do something about it.

-- Pete

-------------------------------------------------------------------------
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
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to