PINE64
xhci-hcd xhci-hcd.0.auto: Cannot set link state. - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85)
+--- Forum: General Discussion on ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=86)
+--- Thread: xhci-hcd xhci-hcd.0.auto: Cannot set link state. (/showthread.php?tid=5439)



xhci-hcd xhci-hcd.0.auto: Cannot set link state. - Lalith - 12-09-2017

Hi everyone, 

Just received my Rock64 board, and as a test tried many software images. I noticed a common problem in all these distros including new 4.13 kernels.

When a USB3 device is plugged the kernels go into continuous  fault:

Code:
[   76.451860] usb usb5-port1: Cannot enable. Maybe the USB cable is bad?
[   76.452493] xhci-hcd xhci-hcd.0.auto: Cannot set link state.
[   76.453042] usb usb5-port1: cannot disable (err = -32)

Can someone please explain the root cause of this, and a possible solution.

Many thanks


RE: xhci-hcd xhci-hcd.0.auto: Cannot set link state. - Lalith - 12-09-2017

addendum:

This seem to happen to devices with jmicron controllers.
A Toshiba 500G USB3 drive works fine.

/dev/sda1:
Timing cached reads: 1636 MB in 2.00 seconds = 818.21 MB/sec
Timing buffered disk reads: 384 MB in 3.00 seconds = 127.93 MB/sec


RE: xhci-hcd xhci-hcd.0.auto: Cannot set link state. - Lalith - 12-19-2017

This chip is very capable on aes encryption / decryption - I am using this as  an ipsec encryption endpoint with Strongswan
Cryptsetup benchmarks are:

#     Algorithm | Key |  Encryption |  Decryption
       aes-cbc   128b   342.5 MiB/s   424.6 MiB/s
       aes-cbc   256b   295.0 MiB/s   387.7 MiB/s
       aes-xts   256b   382.4 MiB/s   383.9 MiB/s
       aes-xts   512b   352.4 MiB/s   353.1 MiB/s


RE: xhci-hcd xhci-hcd.0.auto: Cannot set link state. - xalius - 12-19-2017

With Linux XHCI you always have to check if you particular USB3 device needs some USB quirks enabled in the driver (mostly module options). For SATA bridges, JMS 567/578 seem to work best...


RE: xhci-hcd xhci-hcd.0.auto: Cannot set link state. - Lalith - 12-19-2017

Hi Xalius,
just looked at https://elixir.free-electrons.com/linux/latest/source/drivers/usb/host/xhci-pci.c
I have not done this before, and I will certainly give it a try.
Many thanks for the pointer !
I have 3 JMS based devices and they all seems to be problematic at the moment; the one which works without a problem is:
Bus 002 Device 004: ID 0480:a20c Toshiba America Inc (500GB Disk)