AnsweredAssumed Answered

USB storage works sometimes

Question asked by Juan Manuel Figueroa Iguardia on Sep 13, 2017
Latest reply on Sep 13, 2017 by igorpadykov

Hi all,

 

We are working on our custom board using an iMX7D and are having some issues with certain USB storage devices. Some storage devices work and some throw a bunch of errors, not always the same. Also, as far as we can tell, non storage devices work fine.

We are using TPD4S214 for VBUS supply and ESD. Here are some examples:

 

Working stick (SanDisk Cruzer 2GB):
[   38.276335] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[   38.471817] usb-storage 1-1:1.0: USB Mass Storage device detected
[   38.483594] scsi host0: usb-storage 1-1:1.0
[   39.527818] scsi 0:0:0:0: Direct-Access     SanDisk  U3 Cruzer Micro  3.27 PQ: 0 ANSI: 2
[   39.542802] sd 0:0:0:0: [sda] 4013710 512-byte logical blocks: (2.06 GB/1.91 GiB)
[   39.562553] sd 0:0:0:0: [sda] Write Protect is off
[   39.567529] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[   39.582539] sd 0:0:0:0: [sda] No Caching mode page found
[   39.587982] sd 0:0:0:0: [sda] Assuming drive cache: write through
[   39.619328] random: crng init done
[   39.629297]  sda: sda1
[   39.638407] sd 0:0:0:0: [sda] Attached SCSI removable disk
 
[root@xxxxxxE400666 ~]# mount /dev/sda1 /mnt
[root@xxxxxxE400666 ~]# cd /mnt
[root@xxxxxxE400666 mnt]# ls -l
total 304
drwxr-xr-x 2 root root   4096 Dec 17  2010 BOOTWS
drwxr-xr-x 3 root root   4096 Dec 17  2010 WINSETUP
-rwxr-xr-x 1 root root   2048 Dec 19  2009 default
-rwxr-xr-x 1 root root 232609 Feb  9  2010 grldr
-rwxr-xr-x 1 root root   2529 Dec 17  2010 menu.lst
-rwxr-xr-x 1 root root  43220 Feb 17  2010 plpbt.bin
-rwxr-xr-x 1 root root     52 Feb 11 16:29 testFile.txt
-rwxr-xr-x 1 root root     74 Feb 11  2016 testFile2.txt
-rwxr-xr-x 1 root root      0 Dec 12  2009 usbdrive.tag
-rwxr-xr-x 1 root root   2048 Dec 19  2009 windefault
-rwxr-xr-x 1 root root   1349 Dec 17  2010 winsetup.lst
[root@xxxxxxE400666 mnt]# cd /
[root@xxxxxxE400666 /]# umount /mnt
[root@xxxxxxE400666 /]# eject /dev/sda
[  159.710503] sda: detected capacity change from 2055019520 to 0
[root@xxxxxxE400666 /]# [  203.860107] usb 1-1: USB disconnect, device number 2
Not working (Lexar 8GB):
[  232.956334] usb 1-1: new high-speed USB device number 3 using ci_hdrc
[  233.622567] usb-storage 1-1:1.0: USB Mass Storage device detected
[  233.635313] scsi host0: usb-storage 1-1:1.0
[  234.830988] scsi 0:0:0:0: Direct-Access     Lexar    USB Flash Drive  1100 PQ: 0 ANSI: 0 CCS
[  234.843592] sd 0:0:0:0: [sda] 15663104 512-byte logical blocks: (8.02 GB/7.47 GiB)
[  234.861854] sd 0:0:0:0: [sda] Write Protect is off
[  234.866785] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[  234.880457] sd 0:0:0:0: [sda] No Caching mode page found
[  234.885818] sd 0:0:0:0: [sda] Assuming drive cache: write through
[  235.056343] usb 1-1: reset high-speed USB device number 3 using ci_hdrc
[  240.226340] usb 1-1: device descriptor read/64, error -110
[  244.026682] usb 1-1: USB disconnect, device number 3
[  244.066456] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[  244.075192] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  244.082566] blk_update_request: I/O error, dev sda, sector 0
[  244.088265] Buffer I/O error on dev sda, logical block 0, async page read
[  244.096686]  sda: unable to read partition table
[  244.117219] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[  244.127127] sd 0:0:0:0: [sda] Sense not available.
[  244.131941] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)
[  244.141966] sd 0:0:0:0: [sda] Write Protect is on
[  244.146786] sd 0:0:0:0: [sda] Mode Sense: 00 ee ff ff
[  244.155037] sd 0:0:0:0: [sda] Attached SCSI removable disk
[  244.526327] usb 1-1: new high-speed USB device number 4 using ci_hdrc
[  245.182320] usb-storage 1-1:1.0: USB Mass Storage device detected
[  245.194700] scsi host0: usb-storage 1-1:1.0
[  246.431245] scsi 0:0:0:0: Direct-Access     Lexar    USB Flash Drive  1100 PQ: 0 ANSI: 0 CCS
[  246.443833] sd 0:0:0:0: [sda] 15663104 512-byte logical blocks: (8.02 GB/7.47 GiB)
[  246.461973] sd 0:0:0:0: [sda] Write Protect is off
[  246.466906] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[  246.480333] sd 0:0:0:0: [sda] No Caching mode page found
[  246.485691] sd 0:0:0:0: [sda] Assuming drive cache: write through
[  246.656341] usb 1-1: reset high-speed USB device number 4 using ci_hdrc
[  251.826327] usb 1-1: device descriptor read/64, error -110
[  255.626681] usb 1-1: USB disconnect, device number 4
[  255.666460] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[  255.675198] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  255.682571] blk_update_request: I/O error, dev sda, sector 0
[  255.688269] Buffer I/O error on dev sda, logical block 0, async page read
[  255.696636]  sda: unable to read partition table
[  255.742687] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[  255.752604] sd 0:0:0:0: [sda] Sense not available.
[  255.757452] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)
[  255.765903] sd 0:0:0:0: [sda] Attached SCSI removable disk
Note that the Lexar stick results in an endless loop of USB resets.
Not working (Kingston DataTraveler G2):
[  537.276333] usb 1-1: new high-speed USB device number 12 using ci_hdrc
[  537.490773] usb-storage 1-1:1.0: USB Mass Storage device detected
[  537.510115] scsi host0: usb-storage 1-1:1.0
[  538.567598] scsi 0:0:0:0: Direct-Access     Kingston DataTraveler G2  1.00 PQ: 0 ANSI: 2
[  538.581188] sd 0:0:0:0: [sda] 3913664 512-byte logical blocks: (2.00 GB/1.87 GiB)
[  538.594830] sd 0:0:0:0: [sda] Write Protect is off
[  538.599769] sd 0:0:0:0: [sda] Mode Sense: 16 24 09 51
[  538.617095] sd 0:0:0:0: [sda] Incomplete mode parameter data
[  538.622784] sd 0:0:0:0: [sda] Assuming drive cache: write through
[  538.650994]  sda: sda1
[  538.662221] sd 0:0:0:0: [sda] Attached SCSI removable disk
[  538.827908] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  539.196330] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  539.566331] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  539.936331] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  540.306335] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  540.676327] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  540.867885] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  540.876193] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 3b b7 00 00 00 08 00
[  540.883572] blk_update_request: I/O error, dev sda, sector 3913472
[  541.036329] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  541.406329] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  541.776333] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  542.156331] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  542.526330] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  542.896335] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  543.089882] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  543.098214] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 3b b7 00 00 00 08 00
[  543.105564] blk_update_request: I/O error, dev sda, sector 3913472
[  543.111796] Buffer I/O error on dev sda, logical block 489184, async page read
[  543.326343] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  543.696331] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  544.066331] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  544.436329] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  544.816321] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  545.186328] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  545.377881] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  545.386187] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 3b b7 3f 00 00 08 00
[  545.393578] blk_update_request: I/O error, dev sda, sector 3913535
[  545.546332] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  545.916329] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  546.287208] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  546.666332] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  547.036330] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  547.406328] usb 1-1: reset high-speed USB device number 12 using ci_hdrc
[  547.597711] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  547.606014] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 3b b7 40 00 00 07 00
[  547.613396] blk_update_request: I/O error, dev sda, sector 3913536
[  547.619614] Buffer I/O error on dev sda1, logical block 3913473, async page read
[  547.627052] Buffer I/O error on dev sda1, logical block 3913474, async page read
[  547.634469] Buffer I/O error on dev sda1, logical block 3913475, async page read
[  547.641899] Buffer I/O error on dev sda1, logical block 3913476, async page read
[  547.649329] Buffer I/O error on dev sda1, logical block 3913477, async page read
[  547.656759] Buffer I/O error on dev sda1, logical block 3913478, async page read
[  547.664167] Buffer I/O error on dev sda1, logical block 3913479, async page read
Thanks in advance
Juan

Outcomes