Skip to contentSkip to conversation

USB EHCI chipidea regression on NXP i.MX7

DISCUSSION Francesco Dolcini 3 participants 6 messages Jan 8, 2025 – Feb 3, 2025 USB

lore
Share & tools
lore
#0 lore raw

Hello Xu Yang and all,
commit dda4b60ed70b ("usb: ehci: add workaround for chipidea PORTSC.PEC bug") introduced a regression on NXP i.MX7 SoC.

If the USB port is connected to a USB HUB, and a device is connected at boot time to such a hub, the following errors are printed and the USB port is not functional.

[    1.131847] usbhid: USB HID core driver
[    9.471549] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    9.516311] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    9.516697] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    9.516728] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.527751] hub 1-0:1.0: USB hub found
[    9.827109] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[   10.029600] usb 1-1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3
[   10.071198] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   10.111575] hub 1-1:1.0: USB hub found
[   10.741225] usb 1-1: USB disconnect, device number 2
[   10.789292] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[   10.843210] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[   11.361157] usb 1-1: new high-speed USB device number 5 using ci_hdrc
[   11.891163] usb 1-1: new high-speed USB device number 6 using ci_hdrc
[   12.231248] usb usb1-port1: unable to enumerate USB device

The issue was reproduced on a recent v6.6 kernel.

Ritesh, in Cc, did the bisect and debugged this issue, he might be able to provide more details if needed.

- Any suggestion?
- Can you please specify with SoCs are affected by this frame babble bug?
- How can I reproduce this frame babble bug? Is there an easy way to test it?

Thanks,
Francesco

#1 lore raw

Hi Francesco,

Quoted 3 lines · Francesco Dolcini

Hello Xu Yang and all,
commit dda4b60ed70b ("usb: ehci: add workaround for chipidea PORTSC.PEC bug") introduced a regression on NXP i.MX7 SoC.

Thanks for you report.

Quoted 4 lines

If the USB port is connected to a USB HUB, and a device is connected at boot time to such a hub, the following errors are printed and the USB port is not functional.

Does this happen 100%?
I tried many time on i.MX7ULP-EVK board, but I can't reproduce this issue.

[    2.314190] usbhid: USB HID core driver
[    2.923583] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.12
[    2.931923] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.939214] usb usb1: Product: EHCI Host Controller
[    2.944101] usb usb1: Manufacturer: Linux 6.12.3-lts-next-g87db307efae0 ehci_hcd
[    2.951597] usb usb1: SerialNumber: ci_hdrc.0
[    5.447736] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[    5.628792] usb 1-1: New USB device found, idVendor=2109, idProduct=2817, bcdDevice= 2.14
[    5.639867] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    5.647853] usb 1-1: Product: USB2.0 Hub
[    5.653574] usb 1-1: Manufacturer: VIA Labs, Inc.
[    6.417762] usb 1-1.2: new high-speed USB device number 3 using ci_hdrc
[    6.621455] usb 1-1.2: New USB device found, idVendor=0781, idProduct=5581, bcdDevice= 1.00
[    6.647822] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    6.655189] usb 1-1.2: Product: Ultra
[    6.687824] usb 1-1.2: Manufacturer: SanDisk
[    6.692255] usb 1-1.2: SerialNumber: 4C530001230223105163
[    6.750484] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[    6.785959] scsi host0: usb-storage 1-1.2:1.0
Quoted 18 lines
[    1.131847] usbhid: USB HID core driver
[    9.471549] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    9.516311] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    9.516697] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.06
[    9.516728] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.527751] hub 1-0:1.0: USB hub found
[    9.827109] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[   10.029600] usb 1-1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3
[   10.071198] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   10.111575] hub 1-1:1.0: USB hub found
[   10.741225] usb 1-1: USB disconnect, device number 2
[   10.789292] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[   10.843210] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[   11.361157] usb 1-1: new high-speed USB device number 5 using ci_hdrc
[   11.891163] usb 1-1: new high-speed USB device number 6 using ci_hdrc
[   12.231248] usb usb1-port1: unable to enumerate USB device
Quoted 8 lines

The issue was reproduced on a recent v6.6 kernel.

Ritesh, in Cc, did the bisect and debugged this issue, he might be able to provide more details if needed.

- Any suggestion?
- Can you please specify with SoCs are affected by this frame babble bug?
- How can I reproduce this frame babble bug? Is there an easy way to test it?

As of now, only i.MX7ULP and i.MX8ULP will be effected by below commit:
12e6ac69cc7e (usb: chipidea: add workaround for chipidea PEC bug, 2023-08-09)

Some things to confirm:
1. Which board and Soc are you using?
2. Does usb host controller work well after system boot to cmdline?
3. Do you meet this issue on usb hub and usb devices from different vendors?
4. Does it work well by only revert commit 12e6ac69cc7e?

Thanks,
Xu Yang

#2 lore raw
Quoted 6 lines · Xu Yang
Quoted 3 lines

If the USB port is connected to a USB HUB, and a device is connected at boot time to such a hub, the following errors are printed and the USB port is not functional.

Does this happen 100%?
I tried many time on i.MX7ULP-EVK board, but I can't reproduce this issue.

The issue happens with i.MX7D.

Francesco

#3 lore raw
Quoted 9 lines · Francesco Dolcini
Quoted 6 lines · Xu Yang
Quoted 3 lines

If the USB port is connected to a USB HUB, and a device is connected at boot time to such a hub, the following errors are printed and the USB port is not functional.

Does this happen 100%?
I tried many time on i.MX7ULP-EVK board, but I can't reproduce this issue.

The issue happens with i.MX7D.

Then I think this issue is not related to that commit. I also tried on i.MX7D, but I still can't reproduce it.

Please firstly confirm few questions in last mail.

Thanks,
Xu Yang

#4 lore raw

Hello,

Quoted 9 lines · Xu Yang
Quoted 8 lines · Francesco Dolcini
Quoted 6 lines · Xu Yang
Quoted 3 lines

If the USB port is connected to a USB HUB, and a device is connected at boot time to such a hub, the following errors are printed and the USB port is not functional.

Does this happen 100%?
I tried many time on i.MX7ULP-EVK board, but I can't reproduce this issue.

Quoted 6 lines
Quoted 1 line

The issue happens with i.MX7D.

Then I think this issue is not related to that commit. I also tried on i.MX7D, but I still can't reproduce it.

Please firstly confirm few questions in last mail.

Thanks Xu Yang for trying this out.

Ritesh: can you help here?

Francesco

#5 lore raw

Hi everyone,

Quoted 14 lines · Francesco Dolcini

Hello,

Quoted 11 lines · Xu Yang
Quoted 9 lines · Francesco Dolcini
Quoted 6 lines · Xu Yang
Quoted 3 lines

If the USB port is connected to a USB HUB, and a device is connected at boot time to such a hub, the following errors are printed and the USB port is not functional.

Does this happen 100%?
I tried many time on i.MX7ULP-EVK board, but I can't reproduce this issue.

The issue happens with i.MX7D.

Quoted 8 lines
Quoted 4 lines

Then I think this issue is not related to that commit. I also tried on i.MX7D, but I still can't reproduce it.

Please firstly confirm few questions in last mail.

Thanks Xu Yang for trying this out.

Ritesh: can you help here?

We did some more tests on our (Toradex) side and the issue is not related to the mentioned commit. We sent a first patch which tries to address the issue:
https://lore.kernel.org/all/[email protected]/

Sorry for the false alert.

Regards,
Stefan