3

I'm trying to disable USB3 entirely on my raspberry pi 4 running Ubuntu server but I can't find a way to do it. Some things that I've tried are:

  • Blacklisting xhci - doesn't work because it's a builtin module.
  • Using setpci as documented here to disable it - this command doesn't work because -H1 isn't an argument in the version of setpci that is available. Without -H1 it doesn't seem to do anything.
  • Disabling USB 3 at some lower level - normally you can do this in the bios but I think the pi doesn't have a bios, I couldn't find any other way to do this.

Is there anything else I can try?

More context: I'm hoping that this will allow me to use more than 32 USB devices as explained here.

1 Answer 1

1

Try adding

initcall_blacklist=xhci_hcd_init

to your kernel parameters (/boot/firmware/cmdline.txt). Or maybe xhci_init_driver. You'll have to experiment here.

Also take a look at the "quirks" available in drivers/usb/host/xhci.h. Specifically, if this is an Intel-only limitation, you could try XHCI_NEC_HOST. There's also XHCI_EP_LIMIT_QUIRK, though I honestly have no idea what it does.

If the experiments are fruitless, you'll have to build a custom kernel.

5
  • Oh, I actually tried this too but Ubuntu on the raspberry pi doesn't seem to have a /boot/cmdline.txt file. Do you know what the equivalent place is?
    – dshepherd
    Commented Mar 10, 2021 at 15:12
  • 1
    @dshepherd Not really. Find out which bootloader you are using (grub?) and how to provide it with custom kernel parameters. Commented Mar 10, 2021 at 15:14
  • 1
    Turns out that it uses a modified version of U-boot which provides a /boot/firmware/cmdline.txt which works like the normal raspberry pi /boot/cmdline.txt.
    – dshepherd
    Commented Mar 10, 2021 at 15:56
  • 1
    That particular blacklist didn't do anything but I searched the kernel source code for __init and xhci and found xhci_pci_init. Blacklisting that definitely stopped it from using xhci for the USB ports but unfortunately it doesn't use ehci instead, so I guess this is a dead end. Thanks anyway!
    – dshepherd
    Commented Mar 10, 2021 at 16:43
  • 1
    I also had a look at the quirks config that you mentioned but from the comments it sounds like that would give me a completely broken USB system rather than a working USB system with a larger number of devices.
    – dshepherd
    Commented Mar 10, 2021 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.