USB Hub issue on i.mx7d

cancel
Showing results for 
Search instead for 
Did you mean: 

USB Hub issue on i.mx7d

384 Views
marcuscw_liang
Contributor II

Hi all,

    I am working on the i.mx7d on Linux kernel 4.4. And I encounter some weird issue on the USB host. 

    I also perform the same test on the imx7d saber EVB, and the result are quite similar.

   

    Here is my test step:

    <Step 1> Connect a USB hub to the USB Host of the i.mx7d. 

    <Step 2> Leave the downstream ports of the USB hub unused

    <Step 3> Perform plug & unplug a USB device on one downstream port of the USB hub  repeatedly

    <Step 4> Got error message on the Linux kernel as below:

[85384.880249] usb 1-1: USB disconnect, device number 3

[85384.885237] usb 1-1.3: USB disconnect, device number 35
[85384.894818] usb usb1-port1: cannot reset (err = -32)
[85384.904032] usb usb1-port1: cannot reset (err = -32)
[85384.912129] usb usb1-port1: cannot reset (err = -32)
[85384.919528] usb usb1-port1: cannot reset (err = -32)
[85384.925287] usb usb1-port1: cannot reset (err = -32)
[85384.930330] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[85384.937233] usb usb1-port1: cannot reset (err = -32)
[85384.942293] usb usb1-port1: cannot reset (err = -32)
[85384.947295] usb usb1-port1: cannot reset (err = -32)
[85384.952421] usb usb1-port1: cannot reset (err = -32)
[85384.957425] usb usb1-port1: cannot reset (err = -32)
[85384.962434] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[85384.969038] usb usb1-port1: attempt power cycle
[85385.290269] usb usb1-port1: cannot reset (err = -32)
[85385.295279] usb usb1-port1: cannot reset (err = -32)
[85385.300351] usb usb1-port1: cannot reset (err = -32)
[85385.305477] usb usb1-port1: cannot reset (err = -32)
[85385.310544] usb usb1-port1: cannot reset (err = -32)
[85385.315530] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[85385.322216] usb usb1-port1: cannot reset (err = -32)
[85385.327441] usb usb1-port1: cannot reset (err = -32)
[85385.332515] usb usb1-port1: cannot reset (err = -32)
[85385.337518] usb usb1-port1: cannot reset (err = -32)
[85385.342582] usb usb1-port1: cannot reset (err = -32)
[85385.347554] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[85385.354187] usb usb1-port1: unable to enumerate USB device

    <Step 5> Check the USB devices on my system, and found the USB Hub disappear 

    <Step 6> Any connection to the USB hub downstream port would not be detected anymore

    <Step 7> Reset the hub by the RESET pin or reconnect the hub(unplug/plug) would make the USB Hub connect again

I tried to trace the USB hub driver source code, the failure to reset the hub port is caused by the set_port_feature with USB_PORT_FEAT_RESET. The control message submit the urb successfully, but get EPIPE(32) after the waiting for completion.

I performed the same test on various USB hub, and the result are not totally same:

1. SMSC USB2507: 

    Got error as described. the USB hub disappear and need to reset the hub manually or unplug & plug manually.

2. SMSC USB2514:

    Got error as described in <Step 4> but the "attempt power cycle" step works and the hub is reconnected

    <Step 5>, <Step 6> & <Step 7> not happened

3. Terminus (vid:1A40, pid:0101)

    Got error as described in <Step 4> but the "attempt power cycle" step works and the hub is reconnected

    <Step 5>, <Step 6> & <Step 7> not happened

4. Genesys (vid:05E3, pid:0610)

    no error happened

For the error message, I found an old post provide a possible workaround by setting the autosuspend timeout value to -1(disable autosuspend) to the usbcore. (fsl-ehci fsl-ehci.1: port 1 reset error -110 - Unable to connect to usb 2.0HUB). And I tried to add it to my Linux kernel command line, and it work like a charm.

I want to know more about this workaround.

1. Is there any side effect of this setting?

2. Why is this issue related to the autosuspend of the hub?

 

Thanks.

Labels (1)
Tags (2)
0 Kudos
1 Reply

314 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

No There is not side effects with this solution, however you are playing with non supported kernel, if you download the L4.19.35 or L5.4.3 this don´t appear. usbcore.autosuspend=-1 is related to the usb module.

Regards