ChangeSet 1.1371.759.31, 2004/04/26 16:10:49-07:00, [EMAIL PROTECTED]

[PATCH] USB: usb-storage driver changes for 2.6.x [3/4]

This patch adds some clear-halt calls if a GetMaxLUN fails.  Apparently,
some devices (like certain early-rev Zip100s) stall their bulk pipes if
they receive a GetMaxLUN.


 drivers/usb/storage/transport.c |   11 +++++++++++
 1 files changed, 11 insertions(+)


diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c   Fri May 14 15:32:22 2004
+++ b/drivers/usb/storage/transport.c   Fri May 14 15:32:22 2004
@@ -908,6 +908,17 @@
                                 USB_RECIP_INTERFACE,
                                 0, us->ifnum, us->iobuf, 1, HZ);
 
+       /* 
+        * Some devices (i.e. Iomega Zip100) need this -- apparently
+        * the bulk pipes get STALLed when the GetMaxLUN request is
+        * processed.   This is, in theory, harmless to all other devices
+        * (regardless of if they stall or not).
+        */
+       if (result < 0) {
+               usb_stor_clear_halt(us, us->recv_bulk_pipe);
+               usb_stor_clear_halt(us, us->send_bulk_pipe);
+       }
+
        US_DEBUGP("GetMaxLUN command result is %d, data is %d\n", 
                  result, us->iobuf[0]);
 



-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to