Floyd Johnson via plug on 23 Jul 2021 05:33:23 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Possible fix for spontaneous resets of Raven2 USB 3.x controller under kernel 5.11.x

I recently ran into spontaneous resets of the USB controller on my HP 15z when I plugged a Western Digital MyPassport into it (which showed up as random read errors to ext4fs), yet a SanDisk stick handled just fine.

The answer turned out to be to invoke quirk handling on the reported-as-built-in xhci_hcd module. The defined XHCI quirk flags can be found at https://github.com/torvalds/linux/blob/master/drivers/usb/host/xhci.h, the first of which is defined with "#define XHCI_LINK_TRB_QUIRK", followed by a bit-shifting macro whose argument is a power of 2.

For this host controller, identified by "lspci -nnk|grep -iA2 usb" as:

03:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Raven2 USB 3.1 [1022:15e5]
    Subsystem: Hewlett-Packard Company Raven2 USB 3.1 [103c:8706]
    Kernel driver in use: xhci_hcd
    Kernel modules: xhci_pci

the quirks turned out to be



I edited /etc/default/grub to set 

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash xhci_hcd.quirks=167772160"

and after "sudo update-grub" and a reboot, the outboard disk is spinning and winning :)

Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug