ChangeSet 1.1608.24.9, 2004/02/26 14:18:20-08:00, [EMAIL PROTECTED]
[PATCH] USB Storage: Fix for Fuji Finepix 1400
This patch changes some error checking so that some bogus devices (like the
Fuji Finepix 1400) will work.
This is basically relaxing a test on a field that the spec says "should
always be zero"
drivers/usb/storage/transport.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c Tue Mar 16 15:06:37 2004
+++ b/drivers/usb/storage/transport.c Tue Mar 16 15:06:37 2004
@@ -809,15 +809,19 @@
}
/* If not UFI, we interpret the data as a result code
- * The first byte should always be a 0x0
- * The second byte & 0x0F should be 0x0 for good, otherwise error
+ * The first byte should always be a 0x0.
+ *
+ * Some bogus devices don't follow that rule. They stuff the ASC
+ * into the first byte -- so if it's non-zero, call it a failure.
*/
if (us->iobuf[0]) {
- US_DEBUGP("CBI IRQ data showed reserved bType %d\n",
+ US_DEBUGP("CBI IRQ data showed reserved bType 0x%x\n",
us->iobuf[0]);
- return USB_STOR_TRANSPORT_ERROR;
+ goto Failed;
+
}
+ /* The second byte & 0x0F should be 0x0 for good, otherwise error */
switch (us->iobuf[1] & 0x0F) {
case 0x00:
return USB_STOR_TRANSPORT_GOOD;
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel