Hi,
On 6/9/21 12:31 PM, Michael Mrozek wrote:
Hi,
sometimes on our OS, the USB ports (as well as the modem) don't work. Not even a mouse or a similar low-power device works in that case.
The hardware should be fine, as IF it works after booting up, it works totally reliably.
I've attached a dmesg output from a user of the boot process when USB does NOT work.
I've also asked him to send a dmesg after he plugs in a device, so we can see what error USB produces.
But there are already a few interesting error messages in the dmesg. It seems the USB bus is found.. but produces an error. What's error -110 ?
I believe -110 is -ETIMEDOUT. From what I know of the Linux kernel USB code, it's fairly common to send a USB request to the HW USB controller, and then wait a fixed time for the controller to run the callback function of the request. If this doesn't happen within the given time span, the request will fail with -ETIMEDOUT as error code.
Any idea how to debug this further?
AFAIR this effect changes based on the U-Boot / MLO setup you use. I remember that I tried various U-Boot / MLO combinations when starting the mass production - and one ALWAYS had a failing USB. Didn't test that thoroughly, so take it with a grain of salt. But maybe some initialization parameters in the board file or similar are off?
[7.084037] ehci-omap 4a064c00.ehci: EHCI Host Controller [7.100253] ehci-omap 4a064c00.ehci: new USB bus registered, assigned bus number 1 [7.114047] ehci-omap 4a064c00.ehci: irq 106, io mem 0x4a064c00 [7.154177] ehci-omap 4a064c00.ehci: USB 2.0 started, EHCI 1.00 [7.170718] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.06 [7.183576] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [7.195528] usb usb1: Product: EHCI Host Controller [7.204562] usb usb1: Manufacturer: Linux 5.6.19-daveiii-pyradef-aufs ehci_hcd [7.216372] usb usb1: SerialNumber: 4a064c00.ehci [7.225588] hub 1-0:1.0: USB hub found [7.233218] hub 1-0:1.0: 3 ports detected [7.604098] usb 1-2: new high-speed USB device number 2 using ehci-omap [7.706183] ehci-omap 4a064c00.ehci: port 2 reset error -110 [16.474154] usb usb1-port2: Cannot enable. Maybe the USB cable is bad? [16.489352] usb usb1-port2: attempt power cycle
Looks like it manages to do at least partial arbitration, and find some devices, but then times out on a reset request to one of the devices. There are a lot more USB debug and tracing options to enable in the kernel, but I never really figured out how...
I've done some minor dives in the Linux USB stack, but it is far from trivial (to me at least), and many drivers are unique in their own way. I wish I could provide you with a better answer
Kernel mailing list Kernel@pyra-handheld.com http://pyra-handheld.com/cgi-bin/mailman/listinfo/kernel