ChangeSet 1.1843.4.11, 2004/08/24 11:43:00-07:00, [EMAIL PROTECTED]

[PATCH] USB Storage: help vendors count to 1...

It turns out that the Konica-Minolta DiMAGE A2 camera, in addition to all
its other problems, returns a 0-length reply to the GetMaxLUN request.
With this patch (accept a null reply as meaning a single LUN) it is
somewhat useable.

It's amazing to me that vendors have this much trouble counting to 1....


Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Matthew Dharm <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/storage/transport.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c   2004-08-26 16:42:51 -07:00
+++ b/drivers/usb/storage/transport.c   2004-08-26 16:42:51 -07:00
@@ -911,6 +911,7 @@
        int result;
 
        /* issue the command */
+       us->iobuf[0] = 0;
        result = usb_stor_control_msg(us, us->recv_ctrl_pipe,
                                 US_BULK_GET_MAX_LUN, 
                                 USB_DIR_IN | USB_TYPE_CLASS | 
@@ -921,7 +922,7 @@
                  result, us->iobuf[0]);
 
        /* if we have a successful request, return the result */
-       if (result == 1)
+       if (result >= 0)
                return us->iobuf[0];
 
        /* 



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to