This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM4378: USB3.0 disk doesn't work

Part Number: AM4378

Tool/software: Linux

software :  SDK is 04.00.00.04.

hardware: USB1

USB2.0 disk can work normally. But the 3.0 disk can not, it can be recognized and mounted but crashed after start to do data transfer.

And there is strage that a usb 3.0 root is present. As we know am4378 dose not has usb3.0 root hub.

So it seem that the USB stack treadet the disk as an USB3.0 one. when it do recognize it will not cause problerm because enumeration just use D+ D-.

Can some give a direction that i can try?

~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0951:1666 Kingston Technology    // this is my usb 3.0 disk
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

  • the log:

    root@am437x-evm:/mnt# [ 184.662136] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
    [ 188.982099] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
    [ 193.302114] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
    [ 197.622101] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
    [ 197.628890] usb 1-1: USB disconnect, device number 2
    [ 197.675908] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
    [ 197.684266] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 00 00 1b 4f 00 00 f0 00
    [ 197.691896] blk_update_request: I/O error, dev sda, sector 6991
    [ 197.697926] Buffer I/O error on dev sda1, logical block 6928, lost async page write
    [ 197.705698] Buffer I/O error on dev sda1, logical block 6929, lost async page write
    [ 197.713444] Buffer I/O error on dev sda1, logical block 6930, lost async page write
    [ 197.721153] Buffer I/O error on dev sda1, logical block 6931, lost async page write
    [ 197.728892] Buffer I/O error on dev sda1, logical block 6932, lost async page write
    [ 197.736633] Buffer I/O error on dev sda1, logical block 6933, lost async page write
    [ 197.744374] Buffer I/O error on dev sda1, logical block 6934, lost async page write
    [ 197.752112] Buffer I/O error on dev sda1, logical block 6935, lost async page write
    [ 197.759842] Buffer I/O error on dev sda1, logical block 6936, lost async page write
    [ 197.767587] Buffer I/O error on dev sda1, logical block 6937, lost async page write
    [ 197.807136] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
    [ 197.815454] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 00 00 38 1f 00 00 f0 00
    [ 197.823103] blk_update_request: I/O error, dev sda, sector 14367
    [ 198.006323] FAT-fs (sda1): FAT read failed (blocknr 33)
    [ 198.050535] FAT-fs (sda1): FAT read failed (blocknr 33)
    [ 198.170089] FAT-fs (sda1): FAT read failed (blocknr 33)
    [ 198.312540] FAT-fs (sda1): FAT read failed (blocknr 33)
    [ 202.182136] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
    [ 206.502112] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
    [ 210.822117] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
    [ 215.142119] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
    [ 215.148888] usb usb1-port1: unable to enumerate USB devic

  • If insert a USB hub to the USB1 root, then plug USB3.0 disk to the extended hub, everyting woks OK. So the problerm occurs when the USB3.0 disk insert directlly to USB root.

  • Hi David,

    Is this on your custom board or TI EVM? If former, please test the same USB disk on TI EVM first.

  • Hi Bin,

    Both the TI's AM4378-starter-kit and our board has the same issue. 

  • The USB3.0 disk is Kingston 100 G3 16GB version.

  • David,

    The kernel patch in the link below should solve the issue.

  • Anyway, just return?

    diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index bcc1e1b..38adcd4 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -4229,7 +4229,6 @@ static void hub_set_initial_usb2_lpm_policy(struct usb_device *udev) struct usb_hub *hub = usb_hub_to_struct_hub(udev->parent); int connect_type = USB_PORT_CONNECT_TYPE_UNKNOWN; - if (!udev->usb2_hw_lpm_capable) return; if (hub)
  • Hi Bin,

    Is there a clear root cause of the problem? It it a driver bug of hardware bug?

  • Hi David,

    When I initially looked at this issue a few years ago, I didn't have enough time to understand the root cause, and only understood the problem is due to both the USB host and device do not agree on some LPM parameters/protocol, but not sure whose fault. As the patch does, disabling LPM on the host works around the issue.

  • What are you mean about "LPM ", is it Low Power Management?

    I have capture the wave on D+ D- when the it fails, hope this will be helpful for you to debug this issue. This is not very critical for us as the patch you provided really works. I think we can close this thread. Thank you.

    I have use

  • Hi David,

    Thanks for the screenshot, I will look at this issue again once I get time for it.

    LPM is Link Power Management, one of the USB2.0 Specs.