i.MX8M USB3.0 HC died with external USB3.0 hub

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8M USB3.0 HC died with external USB3.0 hub

5,583 Views
MarcoSandrelli
Contributor III

Hi,

we encoutered probing issue when connecting and external USB3.0 HUB to i.MX8M EVK board.

We tested all kernel release, 4.9.88, 4.14-78, 4-14-98, 4-19.35, this is the kernel log:

               
[   34.078251] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   43.998616] usb 4-1.2: Failed to set U1 timeout to 0x0,error code -110
[   49.118597] usb 4-1.2: Set SEL for device-initiated U1 failed.
[   54.238593] usb 4-1.2: Set SEL for device-initiated U2 failed.
[   54.244511] usb 4-1.2: usb_reset_and_verify_device Failed to disable LPM
[   55.263099] usb 4-1.3: Failed to set U1 timeout to 0x0,error code -110
[   55.270168] usb 4-1-port2: cannot disable (err = -110)
[   55.275524] usb-storage 4-1.2:1.0:
[   60.382591] usb 4-1.3: Set SEL for device-initiated U1 failed.
[   60.388961] hub 4-1:1.0: hub_ext_port_status failed (err = -110)
[   65.502593] usb 4-1.3: Set SEL for device-initiated U2 failed.
[   65.508453] usb 4-1.3: usb_reset_and_verify_device Failed to disable LPM
[   66.526615] usb 4-1-port3: cannot disable (err = -110)
[   66.532402] usb-storage 4-1.3:1.0:
[   71.646601] hub 4-1:1.0: hub_ext_port_status failed (err = -110)
[   76.767094] hub 4-1:1.0: hub_ext_port_status failed (err = -110)
[  265.983062] random: crng init done
[  265.986525] random: 7 urandom warning(s) missed due to ratelimiting

After this log USB3.0 died and it doesn't work anymore, the only solution is unbind and bind the driver with:

echo xhci-hcd.1.auto > /sys/bus/platform/drivers/xhci-hcd/unbind
echo xhci-hcd.1.auto > /sys/bus/platform/drivers/xhci-hcd/bind

Sometimes it start to work again but sometimes it gives new errors logs:

[   45.022370] xhci-hcd xhci-hcd.1.auto: xHCI host not responding to stop endpoint command.
[   45.038589] xhci-hcd xhci-hcd.1.auto: xHCI host controller not responding, assume dead
[   45.046516] xhci-hcd xhci-hcd.1.auto: xHCI host not responding to stop endpoint command.
[   45.054893] xhci-hcd xhci-hcd.1.auto: HC died; cleaning up
[   45.055178] hub 4-1:1.0: hub_ext_port_status failed (err = -22)
[   45.055188] usb 4-1-port2: cannot reset (err = -22)
[   45.055195] usb 4-1-port2: cannot reset (err = -22)
[   45.055201] usb 4-1-port2: cannot reset (err = -22)
[   45.055208] usb 4-1-port2: cannot reset (err = -22)
[   45.055214] usb 4-1-port2: cannot reset (err = -22)
[   45.055217] usb 4-1-port2: Cannot enable. Maybe the USB cable is bad?
[   45.055226] usb 4-1-port2: cannot disable (err = -22)
[   45.055241] hub 4-1:1.0: hub_ext_port_status failed (err = -22)
[   45.055249] usb 4-1-port3: cannot reset (err = -22)
[   45.055256] usb 4-1-port3: cannot reset (err = -22)
[   45.055262] usb 4-1-port3: cannot reset (err = -22)
[   45.055268] usb 4-1-port3: cannot reset (err = -22)
[   45.055274] usb 4-1-port3: cannot reset (err = -22)
[   45.055277] usb 4-1-port3: Cannot enable. Maybe the USB cable is bad?
[   45.055284] usb 4-1-port3: cannot disable (err = -22)
[   45.055293] hub 4-1:1.0: hub_ext_port_status failed (err = -22)
[   45.055300] usb 4-1-port2: cannot reset (err = -22)
[   45.055306] usb 4-1-port2: cannot reset (err = -22)
[   45.055312] usb 4-1-port2: cannot reset (err = -22)
[   45.055318] usb 4-1-port2: cannot reset (err = -22)
[   45.055324] usb 4-1-port2: cannot reset (err = -22)
[   45.055328] usb 4-1-port2: Cannot enable. Maybe the USB cable is bad?
[   45.055334] usb 4-1-port2: cannot disable (err = -22)
[   45.055343] hub 4-1:1.0: hub_ext_port_status failed (err = -22)
[   45.055350] usb 4-1-port3: cannot reset (err = -22)
[   45.055356] usb 4-1-port3: cannot reset (err = -22)
[   45.055361] usb 4-1-port3: cannot reset (err = -22)
[   45.055367] usb 4-1-port3: cannot reset (err = -22)
[   45.055373] usb 4-1-port3: cannot reset (err = -22)
[   45.055377] usb 4-1-port3: Cannot enable. Maybe the USB cable is bad?
[   45.055383] usb 4-1-port3: cannot disable (err = -22)
[   45.055392] hub 4-1:1.0: hub_ext_port_status failed (err = -22)
[   45.055398] usb 4-1-port2: cannot reset (err = -22)
[   45.055405] usb 4-1-port2: cannot reset (err = -22)
[   45.055411] usb 4-1-port2: cannot reset (err = -22)
[   45.055417] usb 4-1-port2: cannot reset (err = -22)
[   45.055423] usb 4-1-port2: cannot reset (err = -22)
[   45.055426] usb 4-1-port2: Cannot enable. Maybe the USB cable is bad?
[   45.055435] usb 4-1-port2: cannot disable (err = -22)
[   45.055444] hub 4-1:1.0: hub_ext_port_status failed (err = -22)
[   45.055450] usb 4-1-port3: cannot reset (err = -22)
[   45.055456] usb 4-1-port3: cannot reset (err = -22)
[   45.055462] usb 4-1-port3: cannot reset (err = -22)
[   45.055468] usb 4-1-port3: cannot reset (err = -22)
[   45.055474] usb 4-1-port3: cannot reset (err = -22)
[   45.055477] usb 4-1-port3: Cannot enable. Maybe the USB cable is bad?
[   45.055483] usb 4-1-port3: cannot disable (err = -22)
[   45.055492] hub 4-1:1.0: hub_ext_port_status failed (err = -22)
[   45.055499] usb 4-1-port2: cannot reset (err = -22)
[   45.055505] usb 4-1-port2: cannot reset (err = -22)
[   45.055511] usb 4-1-port2: cannot reset (err = -22)
[   45.055517] usb 4-1-port2: cannot reset (err = -22)
[   45.055523] usb 4-1-port2: cannot reset (err = -22)
[   45.055526] usb 4-1-port2: Cannot enable. Maybe the USB cable is bad?
[   45.055532] usb 4-1-port2: cannot disable (err = -22)
[   45.055539] usb 4-1-port2: cannot disable (err = -22)
[   45.055542] hub 4-1:1.0: hub_ext_port_status failed (err = -22)
[   45.055548] usb 4-1-port3: cannot reset (err = -22)
[   45.055555] usb 4-1-port3: cannot reset (err = -22)
[   45.055561] usb 4-1-port3: cannot reset (err = -22)
[   45.055566] usb 4-1-port3: cannot reset (err = -22)
[   45.055573] usb 4-1-port3: cannot reset (err = -22)
[   45.055576] usb 4-1-port3: Cannot enable. Maybe the USB cable is bad?
[   45.055582] hub 4-1:1.0: hub_ext_port_status failed (err = -22)
[   45.055585] usb 4-1-port3: cannot disable (err = -22)
[   45.055591] usb 4-1-port3: cannot disable (err = -22)
[   45.055630] hub 4-1:1.0: hub_ext_port_status failed (err = -22)
[   45.055640] hub 4-1:1.0: hub_ext_port_status failed (err = -22)
[   45.134900] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[   45.134912] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x28 28 00 00 00 02 00 00 02 00 00
[   45.134919] print_req_error: I/O error, dev sdb, sector 512
[   45.142355] sd 2:0:0:0: [sdc] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[   45.142365] sd 2:0:0:0: [sdc] tag#0 CDB: opcode=0x28 28 00 00 00 02 00 00 02 00 00

Have you some exprience about it? Suggestion?

Thanks

Labels (1)
Tags (2)
0 Kudos
12 Replies

4,212 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Marco,

I internally asked with AE team about this behavior, and they commented that were unable to reproduce the issue trying several times.

Anyway, they sent a little modification that you could apply to the DTS that may help you:

                usb3_1: usb@38200000 {
                compatible = "fsl, imx8mq-dwc3";
                #address-cells = <2>;
                #size-cells = <2>;
                ranges;
                clocks = <&clk IMX8MQ_CLK_USB2_CTRL_ROOT>;
                clock-names = "usb2_ctrl_root_clk";
                assigned-clocks = <&clk IMX8MQ_CLK_USB_BUS>,
                                <&clk IMX8MQ_CLK_USB_CORE_REF>;
                assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_500M>,
                                        <&clk IMX8MQ_SYS1_PLL_100M>;
                assigned-clock-rates = <500000000>, <100000000>;
                status = "disabled";

 

                usb_dwc3_1: dwc3 {
                        compatible = "snps,dwc3";
                        reg = <0x0 0x38200000 0x0 0x10000>;
                        interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
                        phys = <&usb3_phy1 0>, <&usb3_phy1 1>;
                        phy-names = "usb2-phy", "usb3-phy";
                        power-domains = <&usb_otg2_pd>;
                        snps,power-down-scale = <2>;
                        snps,dis_u3_susphy_quirk;
                        usb3-resume-missing-cas;
                        usb3-lpm-capable;
                        status = "disabled";
                };
        };


Hope this will be useful for you.
Best regards!
/Carlos
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

-------------------------------------------------------------------------------

0 Kudos

4,212 Views
MarcoSandrelli
Contributor III

Hi Carlos,

I tried your suggestion but it doesn't solve the issue. I try to be more detailed in order to reproduce it:

1. Connect an HUB USB3.0 to port dwc3_0 or to port dwc3_1 ;

2. Connect more than one USB KEY 3.0 to the HUB (be sure that link established is 5000M), I can reproduce it with 2 or more USB KEY 3.0 connected, (this behaviour it is NOT reproducible with USB KEY 2.0);

3. Boot the board and left udev automount.rules to mount the USB KEY 3.0

4. Wait more than 40s

If not fail are detetcted repeat for almost 20 times. I can reproduce it after few reboot.

0 Kudos

4,212 Views
MarcoSandrelli
Contributor III

Hi,

I have an update about this issue with i.MX8M Demo Board:

1. Start i.MX8M EVK Board with kernel 4.14.98 and go to shell interface;

2. Connect an HUB3.0 to USB3.0 i.MX8M interface;

3. Connect 2 or more USB KEY3.0 to the HUB;

4. Start copying a 700MB file simultaneously from eMMC to the first USBKEY3.0 and the second USBKEY3.0;

5. Repeat step 4 and i.MX8M USB3.0 Interface crashes after a while;

0 Kudos

4,212 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Marco,

AE team have replied the following:

 

We have reproduced the issue with kernel 4.14.98, and we created a ticket to BSP team.

Can you help us testing on the newest kernel (attached)? For the version kernel, I have not reproduced the issue.

Hope this will be useful for you.

Best regards!

/Carlos

0 Kudos

4,212 Views
MarcoSandrelli
Contributor III

Hi,

we tested shared kernel image but after few cycle it crashed again, these are my steps:

1. Start i.MX8M EVK Board with kernel 5.3  and go to shell interface;

2. Connect an HUB3.0 to USB3.0 i.MX8M interface;

3. Connect 3  USB KEY3.0 to the HUB;

4. Start copying a 700MB file simultaneously from eMMC to the first, to the second and to the third USBKEY3.0;

5. Repeat step 4 and i.MX8M USB3.0 Interface crashes after a while;

0 Kudos

4,212 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Marco,

Please refer to the attachment, that includes a patch sent by AE team that may fix the issue with 4.14.98 kernel. Please help verifying the Patch.

Hope this will be useful for you.
Best regards!
/Carlos
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

-------------------------------------------------------------------------------

0 Kudos

4,212 Views
coindu
Contributor IV

Hi Carios, 

          I encountered the same problem, after playing this patch, it can work, but the reading and writing speed of 3.0usb  drops to 1/3. Can this be optimized?

0 Kudos

4,212 Views
MarcoSandrelli
Contributor III

Hi Carlos,

it works! Thank you

Best Regards

Marco

0 Kudos

4,212 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Marco,

AE team have replied the following:

Did you replace DTB and test with type-A?
In our side, we have not produced the issue with type-A, but type-C cannot recognize the hub. At present 5.3 just is a developing version.
The debug of this issue is still in progress.

Hope this will be useful for you.

Best regards!

/Carlos

0 Kudos

4,212 Views
MarcoSandrelli
Contributor III

Hi Carlos,

I'm testing it today

Thanks!

0 Kudos

4,212 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Marco,
On the internal escalation, AE team replicated the issue. They already creaated a ticket to BSP team.
We will send you an update as soon as having news.

Best regards.
/Carlos

0 Kudos

4,212 Views
MarcoSandrelli
Contributor III

Hi,

have you some updates about this issue?

0 Kudos