Lost USB connection between USB hard drive and Phicomm N1 after a while

My N1 box lost connection to USB hard drive after a while, and dmesg shows something like this:

I tried replacing my cable, moving the USB hard drive to somewhere electromagnetic signals are less, replacing the power adapter, use another N1 box, …, none of them worked.

After trial and error for several weeks, I moved my eyes to the device tree.

I found dwc3’s documentation, which led me further to usb-xhci’s.

I was not clear about those optional properties, and tried enabling some of them to see if it would make a change.

It turns out that Phicomm N1’s USB port seems to have a broken LPM implementation (or no hardware LPM at all?). By specifying optional property usb2-lpm-disable, my box runs for about a day without errors with USB.

Not sure if it’s specific to N1 or an amlogic/S905D issue, though.

Update: It is said that most USB 3.0 devices indicate L1 support in their descriptor when they don’t support it. It might be because of the requirement for USB 3.0 devices to support LPM while operating in the 2.0 mode. That is, there’s a possibility that my USB hard drive’s LPM implementation is broken.

Here’s the diff of dtb.

Here is the dtb with the patch above: meson-gxl-s905d-phicomm-n1-usbfix.zip. Patched upon yangxuan8282‘s meson-gxl-s905d-phicomm-n1.dtb (which disables EEE of NIC), credits to him.

btw, IIRC my first SSD also had a broken LPM implementation, freezing my whole system after running a while..

Leave a Reply

Your email address will not be published.