I'm trying to track down an issue a client is reporting with corrupted USB transfers from a USB pen drive in the 3.0 kernel. The platform is a OMAP 35x LogicPD Torpedo module on a custom base board. The problem that they're seeing is when they read a file from USB pen drive, the md5sum some doesn't always match the expected value. I haven't been able to duplicate the issue they're seeing myself yet, but one of my coworkers suggested running the USB unit tests in the kernel. I'm following the instructions at: http://www.linux-usb.org/usbtest/. I've built a kernel with CONFIG_USB_TEST enabled and with CONFIG_USB_STORAGE set to a module. Then I put the USB pen drive I'm going to run the tests against into the board and boot the kernel. Then I do the following: cat /proc/bus/usb/devices to get the vendor/product ID's and the device number in /proc/bus/usb modprobe usbtest vendor=0x1234 product=0x5678 ./testusb -D /proc/bus/usb/001/003 The results vary depending on which pen drive I use for the test. I've tried three different pen drives and have only had one pass the tests. Below I've listed the output from /proc/bus/usb/devices for each device, followed by the kernel messages generated while testusb is run and the output from testusb itself: ============================================================================== SanDisk Cruzer Crossfire - 1 GiB T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=0781 ProdID=5204 Rev= 0.10 S: Manufacturer=SanDisk Corporation S: Product=Cruzer Crossfire S: SerialNumber=20044317020565A36C5C C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usbtest E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us [ 128.843261] usbtest 1-1.1:1.0: TEST 0: NOP [ 128.850006] usbtest 1-1.1:1.0: TEST 9: ch9 (subset) control tests, 1000 times [ 128.859497] usbtest 1-1.1:1.0: get dev status --> 1 [ 128.866058] usbtest 1-1.1:1.0: ch9 subset failed, iterations left 999 [ 128.873382] usbtest 1-1.1:1.0: TEST 10: queue 32 control calls, 1000 times [ 128.881896] usbtest 1-1.1:1.0: subtest 3 error, status -121 [ 128.887725] usbtest 1-1.1:1.0: control queue 81.00, err -121, 31996 left, subcase 3, len 1/2 /proc/bus/usb/001/003 test 0, 0.006319 secs /proc/bus/usb/001/003 test 9 --> 33 (Numerical argument out of domain) /proc/bus/usb/001/003 test 10 --> 121 (Remote I/O error) ============================================================================== HP - 4 GiB T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=03f0 ProdID=5307 Rev= 1.00 S: Manufacturer=HP S: Product=v165w S: SerialNumber=0000000000000DF0 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=480mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms [ 154.355346] usbtest 1-1.1:1.0: TEST 0: NOP [ 154.362091] usbtest 1-1.1:1.0: TEST 9: ch9 (subset) control tests, 1000 times [ 154.747009] usbtest 1-1.1:1.0: TEST 10: queue 32 control calls, 1000 times /proc/bus/usb/001/003 test 0, 0.006280 secs /proc/bus/usb/001/003 test 9, 0.384226 secs /proc/bus/usb/001/003 test 10, 1.876192 secs ============================================================================== Dane-Elec - 1 GiB T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1234 ProdID=5678 Rev= 1.00 S: Manufacturer=UltraNet S: Product=USB Flash Disk S: SerialNumber=67FA62EA31D6C C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=31875us [ 151.042633] usbtest 1-1.1:1.0: TEST 0: NOP [ 151.049346] usbtest 1-1.1:1.0: TEST 9: ch9 (subset) control tests, 1000 times [ 152.752929] usbtest 1-1.1:1.0: TEST 10: queue 32 control calls, 1000 times [ 152.762786] usbtest 1-1.1:1.0: subtest 7 error, status 0 [ 152.768493] usbtest 1-1.1:1.0: subtest 9 error, status -32 [ 152.774230] usbtest 1-1.1:1.0: control queue 82.00, err -32, 31990 left, subcase 9, len 0/2 /proc/bus/usb/001/003 test 0, 0.006259 secs /proc/bus/usb/001/003 test 9, 1.703594 secs /proc/bus/usb/001/003 test 10 --> 32 (Broken pipe) ============================================================================== So the HP drive passed and the Sandisk and the Dan-Elect failed. We've run electrical USB signal integrity tests on the drives and all three look good electrically. I'd like to figure out why some drives pass these tests and others fail. Any thoughts/theories are welcome! thanks, Jeff Cooper -- 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