How to disable xHCI/UAS

  • I have a box (Beeling GT1) with USB 3 external drive(s).

    Some of the drives (WD My Passport 25E1 2TB) really don't like to play with it spamming dmesg log with:

    Code
    66588.736256@6] usb 1-1.3: reset high-speed USB device number 4 using xhci-hcd
    [66588.736292@6] xhci-hcd xhci-hcd.0.auto: Setup ERROR: setup context command for slot 3.
    [66588.816251@6] usb 1-1.3: reset high-speed USB device number 4 using xhci-hcd
    [66588.816289@6] xhci-hcd xhci-hcd.0.auto: Setup ERROR: setup context command for slot 3.
    [66588.896254@6] usb 1-1.3: reset high-speed USB device number 4 using xhci-hcd
    [66588.937029@4] xhci-hcd xhci-hcd.0.auto: xHCI xhci_drop_endpoint called with disabled ep ffffffc06278b980
    [66588.937047@4] xhci-hcd xhci-hcd.0.auto: xHCI xhci_drop_endpoint called with disabled ep ffffffc06278b9c0

    From googling around it is an issue with USB3 and some suggest to simply disable xHCI in BIOS, but that's not really an option with this box - I don't know how to get into BIOS.

    This stackexchange question seems to be about the same problem and one of the answers susggest fixing it by disabling UAS by editing /boot/armbianEnv.txt but it applies for raspbian and such file does not exist in LE.


    Looking at the lsub

    Code
    gt1:/ # lsusb -t
    /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 5000M
    /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/3p, 480M
        |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 3: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
            |__ Port 4: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M

    All disks use usb-storage driver, but the root_hub uses xhci which might be the problem?

    So..

    How to disable xHCI/UAS for the root_hub device?

  • If the root hub is USB3 then you can't do anything. If it's USB2 then blacklist the xhci_hcd driver.

    It's the USB2 (although the usb controller does support USB3, the S912 does not, so the device does not have USB3 capabilities - as it's been explained to me before).

    But how do I blacklist the xhci_hcd driver?

  • Unfortunately you need the xhci_hcd driver to make the controller work (source).

    Even if the USB 3 hub is a dead eg has zero ports?

    Code
    Bus 02.Port 1: Dev 1

    Because the hub I am actually using (the one that acually has ports) is only 2.0 (480M).

    Code
    gt1:/ # lsusb -t
    /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 5000M
    /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/3p, 480M
        |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 3: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
            |__ Port 4: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M

    Anyway, if I would know how to disable it, I could at least try it.

    But because it's not module (doesn't appear in lsmod) I can't blacklist it in modprobe.d/.

    OR

    Where to put usbstoragequirks= which should disable it for particular ID (taken from lsusb).

  • I've managed to blacklist UAS for my USB3 SCSI adaptor by adding usb-storage.quirks=aaaa:bbbb:u where aaaa is idVendor and bbbb is idProduct to /flash/cmdline.txt.

    Result:

    Code
    [    0.876579] usbcore: registered new interface driver usb-storage
    [    1.490557] usb 2-2: UAS is blacklisted for this device, using usb-storage instead
    [    1.490608] usb 2-2: UAS is blacklisted for this device, using usb-storage instead
    [    1.490615] usb-storage 2-2:1.0: USB Mass Storage device detected
    [    1.490905] usb-storage 2-2:1.0: Quirks match for vid 0080 pid a001: 800000
    [    1.490965] scsi host0: usb-storage 2-2:1.0