3

I have a Debian 9 box, and if I plug in 1 of my devices, its UART shows up in both lsusb and in the output of ls /sys/bus/usb-serial/devices/.

When I attach 2, the 2nd one always shows up.

But for some number greater than 2, no new entries appear in lsusb or usb-serial/devices/. It also seems to be kind of random: sometimes the 3rd device will show up, sometimes not.

This behavior is the same across 3 different brands of USB hub. I also tried connecting these devices on MacOS, and got a similar behavior.

Currently my lsusb looks like this (other hubs and devices omitted for clarity):

... snip
Bus 001 Device 042: ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC
Bus 001 Device 040: ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC
Bus 001 Device 036: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 039: ID 10c4:ea71 Cygnal Integrated Products, Inc.
Bus 001 Device 037: ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC
... snip 

Is there some system setting preventing the additional devices from showing up?

Alex Shroyer
  • 213
  • 2
  • 11
  • "No new entries in `lsusb`" is definitely strange. Power issues (though that's unlikely for a UART)? Did your hubs include a powered one? Proprietary FTDI magic? In theory, you should be able to plug in as many devices as you want. – dirkt Oct 26 '19 at 07:02
  • I got the same behavior across 2 different brands of powered hub, *and* 2 different brands of unpowered hub. – Alex Shroyer Oct 27 '19 at 20:28
  • Very curious. Anything interesting in `dmesg`? – dirkt Oct 28 '19 at 04:47
  • had to get permission on the server to use `dmesg` but that was a very helpful suggestion, thanks! – Alex Shroyer Oct 28 '19 at 19:16

1 Answers1

1

yes

This is a limitation of the Intel xHCI chipset used on the motherboard.

Specifically, most of these chips limit the number of "devices" to 32. But a single physical thing like a camera may appear to the USB controller chip as multiple "devices". Plus each hub counts as at least 1 "device" so you can easily run into this limit much earlier than you might expect.

In my case, I believe each FTDI chip shows up as 4 devices, plus for some reason the xHCI chip has a max of 16, so I run out after about the 2nd or 3rd physical device is plugged in with a cable.

As visible from dmesg:

[4173630.423513] usb 1-1.2.3-port3: couldn't allocate usb_device
[4173630.430741] xhci_hcd 0000:00:0f.0: Error while assigning device slot ID
[4173630.437521] xhci_hcd 0000:00:0f.0: Max number of devices this xHCI host supports is 16.

The solutions I've found so far essentially boil down to:

  1. add a dedicated PCI USB controller more detail here
  2. downgrade to ehci if possible, to force USB 2.0 and therefore a limit of 128 devices as explained here

In my case it wasn't possible to downgrade the fancy new server to ehci, so we're going to try to use the USB 2.0 ports in the old legacy server as our USB interface. I found it very frustrating that the supposedly "better" USB 3.0 has this limitation.

Alex Shroyer
  • 213
  • 2
  • 11