>> I'll gladly provide more information, if you can tell me where to look. > >Try running SnoopyPro to capture the communication between Windows and >the device. Hi, I finally had some spare time to do the usb capture test. And there is something worth reporting. I compared the log from the card reader with the one captured by plugging a simple usb pendrive and noticed nothing really different. The LUN detection works fine for the card reader here: [5118 ms] >>> URB 10 going down >>> -- URB_FUNCTION_CLASS_INTERFACE: TransferFlags = 00000001 (USBD_TRANSFER_DIRECTION_IN, ~USBD_SHORT_TRANSFER_OK) TransferBufferLength = 00000001 TransferBuffer = 068c74c8 TransferBufferMDL = 00000000 UrbLink = 00000000 RequestTypeReservedBits = 00000000 Request = 000000fe Value = 00000000 Index = 00000000 [5118 ms] UsbSnoop - MyInternalIOCTLCompletion(09f2fddc) : fido=00000000, Irp=069bac60, Context=08c47010, IRQL=2 [5118 ms] <<< URB 10 coming back <<< -- URB_FUNCTION_CONTROL_TRANSFER: PipeHandle = 079af900 TransferFlags = 0000000b (USBD_TRANSFER_DIRECTION_IN, USBD_SHORT_TRANSFER_OK) TransferBufferLength = 00000001 TransferBuffer = 068c74c8 TransferBufferMDL = 05dd8600 00000000: 03 UrbLink = 00000000 SetupPacket = 00000000: a1 fe 00 00 00 00 01 00 I don't think the rest of the log is needed, I can provide it if requested, but if I understood things correctly, Request = 000000fe is the GetMaxLun request and 00000000: 03 is the (correct) answer. So I assumed it might be due to a timeout occurring too quickly in usb_stor_Bulk_max_lun and guess what... I tried with 5*HZ and it didn't work, then raised timeout to 10*HZ and it detected all four devices correctly without any other patch applied. I've attached the new patch that allows my card reader to work. Regards, Giacomo Lozito
--- linux-2.6.30.vanilla/drivers/usb/storage/transport.c 2009-06-10 05:05:27.000000000 +0200 +++ linux-2.6.30/drivers/usb/storage/transport.c 2009-07-12 02:26:27.000000000 +0200 @@ -961,7 +961,7 @@ US_BULK_GET_MAX_LUN, USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE, - 0, us->ifnum, us->iobuf, 1, HZ); + 0, us->ifnum, us->iobuf, 1, 10*HZ); US_DEBUGP("GetMaxLUN command result is %d, data is %d\n", result, us->iobuf[0]);