On Mon, 17 Jun 2013, victor yeo wrote: > > I have an important finding. When the problem (SCSI_READ_10 command > > reads 4096 bytes of data, causing gadget to reset) happens, the PC > > shows that the gadget is detected as Full-speed device, but gadget > > reports that it is set to High-speed from: > > > > g_file_storage gadget: high-speed config #1 > > > > This is printed from do_set_config() in file_storage.c. In UDC driver, > > it is hardcorded to high speed in UDC driver start function. I changed > > it to be set depending on hardware value. Now it is: > > > > g_file_storage gadget: full-speed config #1 Yes, I remember mentioning this to you some time ago. > > However, in usbmon, the SCSI_READ_10 command still requests for 4096 > > bytes of data, and this causes gadget to reset. Please see the gadget > > log, and usbmon trace, and host dmesg log. > > There is a mistake in the previous log file, because the fifo size is > still set to 512 byte. Now i change it to 64 byte if it is Full speed. The FIFO size should always be set to the value in the endpoint descriptor, no matter what speed the connection is. > The log file are attached. The log shows that your 64-byte transfers don't work very well. The first one didn't send any bytes. The second one sent only 4 bytes. And each of the ones after that sent 0 bytes. Alan Stern PS: Something was very wrong with the log file you posted. It is full of bad characters. You can it here: http://marc.info/?l=linux-usb&m=137145486920691&w=2 -- 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