On Sun, 12 Jul 2009, Giacomo Lozito wrote: > 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. Odd. The timestamps in the Windows log show nothing like a 5-second delay. Still, there's nothing wrong with your patch and we can use it. Send it again with a proper Signed-Off-By line as described in Documentation/SubmittingPatches, and be sure to CC: Greg KH (the USB maintainer) so that he is aware of it. You can add Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> Alan Stern P.S.: Instead of patching the driver, you should get an equivalent result by increasing the "delay_use=" module parameter for usb-storage from its default value of 5 seconds up to 15 seconds. Have you tried this? -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html