Hello, NXP team:
We have a custom board based on i.mx8m.
We use the USB 2.0 connect so we only route USB 2.0 signal to USB connector on USB host port.
I test 5 different USB 3.0 flash drives:
2 of them can't be formatted.
When there is problem, there is error message shows:
"[ 56.559920] usb 1-1: reset high-speed USB device number 2 using xhci-hcd"
I suspect the problem is caused by that the driver of XHCI controller can't switch to USB 2.0 mode when hand-shaking.
Do you know what is the problem?
How can i force XHCI controller to operate on USB 2.0 instead of USB 3.0?
The error log is as below:
[ 1411.879438] usb 1-1: new high-speed USB device number 5 using xhci-hcd
[ 1412.040330] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 1412.053005] scsi host0: usb-storage 1-1:1.0
[ 1413.073907] scsi 0:0:0:0: Direct-Access Kingston DataTraveler 3.0 PQ: 0 ANSI: 6
[ 1413.083752] sd 0:0:0:0: [sda] 30218842 512-byte logical blocks: (15.5 GB/14.4 GiB)
[ 1413.092549] sd 0:0:0:0: [sda] Write Protect is off
[ 1413.098137] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 1413.112856] sda: sda1
[ 1413.118122] sd 0:0:0:0: [sda] Attached SCSI removable disk# mkfs.ext4 /dev/sda1
mke2fs 1.43.4 (31-Jan-2017)
Creating filesystem with 3777099 4k blocks and 944704 inodes
Filesystem UUID: 3240b005-8829-416c-b3f6-c84fd75d3101
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: [ 1449.199376] usb 1-1: reset high-speed USB device number 5 using xhci-hcd
[ 1481.967362] usb 1-1: reset high-speed USB device number 5 using xhci-hcd[ 1481.967362] usb 1-1: reset high-speed USB device number 5 using xhci-hcd
[ 1514.735369] usb 1-1: reset high-speed USB device number 5 using xhci-hcd[ 1481.967362] usb 1-1: reset high-speed USB device number 5 using xhci-hcd
[ 1514.735369] usb 1-1: reset high-speed USB device number 5 using xhci-hcd
[ 1545.455371] usb 1-1: reset high-speed USB device number 5 using xhci-hcd
Thank you~!!!
BR,
Richard
This issue can be reproduced on i.mx8mq EVK board easily.
I connect USB flash driver to USB 3.0 host port on EVK board via USB 2.0 extension cord.
Then this issue also happens.
Software version: linux 4.9.51-mx8-ga, linux 4.9.88
The log is as below:
NXP i.MX Release Distro 4.9.51-mx8-ga imx8mqevk ttymxc0
imx8mqevk login: root
Last login: Fri Mar 30 15:54:09 UTC 2018 on tty7
root@imx8mqevk:~# [ 12.743789] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 12.905254] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 12.914205] scsi host0: usb-storage 1-1:1.0
[ 13.945590] scsi 0:0:0:0: Direct-Access Kingston DataTraveler 3.0 PQ: 0 ANSI: 6
[ 13.957102] sd 0:0:0:0: [sda] 30218842 512-byte logical blocks: (15.5 GB/14.4 GiB)
[ 13.965506] sd 0:0:0:0: [sda] Write Protect is off
[ 13.971054] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 13.984333] sda: sda1
[ 13.990179] sd 0:0:0:0: [sda] Attached SCSI removable disk
root@imx8mqevk:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0rpmb 179:96 0 128K 0 disk
mtdblock0 31:0 0 32M 0 disk
mmcblk0boot0 179:32 0 4M 1 disk
sda 8:0 1 14.4G 0 disk
`-sda1 8:1 1 14.4G 0 part
mmcblk0boot1 179:64 0 4M 1 disk
mmcblk0 179:0 0 13.8G 0 disk
|-mmcblk0p2 179:2 0 1.6G 0 part /
`-mmcblk0p1 179:1 0 32M 0 part /run/media/mmcblk0p1
root@imx8mqevk:~# mkfs.ext4 /dev/sda1
mke2fs 1.43 (17-May-2016)
Creating filesystem with 3777099 4k blocks and 944704 inodes
Filesystem UUID: 12978eb3-539b-4f15-bb35-cdf93b21f065
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:[ 66.779880] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
[ 99.547888] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
[ 130.267831] usb 1-1: reset high-speed USB device number 2 using xhci-hcd[ 163.035891] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
[ 195.803889] usb 1-1: reset high-speed USB device number 2 using xhci-hcd[ 228.571886] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
[ 242.776341] INFO: task kworker/u8:4:344 blocked for more than 120 seconds.
[ 242.783295] Tainted: G O 4.9.51-imx_4.9.51_imx8m_ga+g6df7474 #1
[ 242.791009] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 242.798964] kworker/u8:4 D 0 344 2 0x00000000
[ 242.804603] Workqueue: writeback wb_workfn (flush-8:0)
[ 242.809888] Call trace:
[ 242.812465] [<ffff000008085604>] __switch_to+0x8c/0xa0
[ 242.817725] [<ffff000008c0af78>] __schedule+0x178/0x580
[ 242.823069] [<ffff000008c0b3bc>] schedule+0x3c/0xa8
[ 242.828070] [<ffff000008c0e1b4>] schedule_timeout+0x1bc/0x280
[ 242.833936] [<ffff000008c0ad90>] io_schedule_timeout+0xa0/0x110
[ 242.840179] [<ffff0000083b60a0>] get_request+0x3b0/0x688
[ 242.845611] [<ffff0000083b8cd0>] blk_queue_bio+0xe8/0x2c8
[ 242.851128] [<ffff0000083b6db0>] generic_make_request+0xd8/0x230
[ 242.857247] [<ffff0000083b6fb4>] submit_bio+0xac/0x190