Toradex TK1 USB issues

Hello,

I’m investigating some issues when plugging in Wifi/Bluetooth dongles into a board containing the Apalis TK1 module.

First, sometimes when running a wifi scan or bluetooth scan, the entire USB stack will either freeze with no stderr output, or you will see a message like:

[  611.491403] usb 2-3.1: USB disconnect, device number 3
[  617.315206] tegra-xhci tegra-xhci: Timeout while waiting for configure endpoint command
[  624.110096] tegra-xhci tegra-xhci: Stopped the command ring failed, maybe the host is dead
[  624.139217] tegra-xhci tegra-xhci: Host not halted after 16000 microseconds.
[  624.146248] tegra-xhci tegra-xhci: Abort command ring failed
[  624.152176] [sched_delayed] sched: RT throttling activated
[  624.159300] tegra-xhci tegra-xhci: HC died; cleaning up
[  624.170460] usb 2-3: USB disconnect, device number 2

Using a powered hub reduces the frequency of the issue, but does not completely resolve it. When using a powered hub, though the scanning is more reliable, sometimes removing the dongle can also cause USB stack freeze (plugging and unplugging devices no longer has any stderr output, or you might see the HC died message like above).

When the USB dies like the cases above, I have to actually perform a cold boot to get USB working again. Soft reset doesn’t seem to resolve the problem.

A second issue, which is not quite as critical, when unplugging a dongle, there is always a kernel backtrace like:

drivers/base/power/runtime.c:881 pm_runtime_usage_cnt_dec+0x80/0x98()

Any assistance or guidance would be helpful!

Thanks,

Justin D.

Update: For the soft-reset vs cold-boot scenario, Physically disconnecting the wifi dongle before performing a soft reset will allow the USB stack to be working on next boot.

Update 2:
If the unit boots up and the USB stack seems ‘frozen’ (i.e. unplugging/plugging wifi dongles and/or powered USB hubs produces zero console messages), I can ‘unfreeze’ it by issuing the following commands:

# turn off USBH_EN
echo disabled > /sys/class/regulator/regulator.24/state
# turn on USBH_EN
echo enabled > /sys/class/regulator/regulator.24/state

I determined this was USBH_EN by looking at tegra142-apalis-v1.2-fixed.dtsi, and then the following command in linux confirmed it:

cat /sys/class/regulator/regulator.24/name
VCC_USBH(2A|2C|2D|3|4)

Update 3: In the case where ‘HC Died’ shows up in the console, there is nothing I have tried so far that is able to recover the USB subsystem without a reboot

Hi @jdefields and Welcome to the Toradex Community!

Could you provide the version of the software of your module?
Which carrier board are you using?
Which Wifi/Bluetooth dongle are you using?

Best regards,
Jaski