7

I tried connecting multiple usb 3.0 enabled devices to my ubuntu 12.04 machine. But found out that at a time not more than 9 devices could be seen connected. I tried monitoring the kernel logs at /var/log/kern.log, where i found out that on connecting the 10th device, the below error was there:

this device cannot find enough free resources that it can use. (code 12)

My USB Host Controller is:

Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)

Some forums have suggested disabling the USB 3.0 support should force the devices to work in USB 2.0 mode, and it should solve the problem. And this was true. Disabling xHCI support from BIOS did the trick for me.

I assumed this should be a bug on the older Ubuntu 12.04 setup(or the usb driver may be). Therefore, i upgraded my system to Ubuntu 16. But here also the same problem exists. What if i want to use my devices with USB 3.0? What if the option to disable xHCI support from BIOS is not present on some motherboard?

2 Answers 2

5
+50

A controller has internal buffers that it allocates for the connected devices for the purpose of doing input and output. These buffers are also called resources or endpoints.

Faster devices need to have allocated more buffers to contain more data. This number can vary per device, but the maximum is 32 endpoints with 16 in and 16 out per device.

There are reports that the Intel 8 Series USB 3.0 XHCI host controller only supports 96 endpoints, and practical limits can be hit earlier.

From the information in your post, I would guess that each USB3 disk uses 10 endpoints aka. resources, probably 5 in and 5 out. Therefore 9 disks used 90 endpoints which was fine, but 10 disks require 100 endpoints that exceeds the limit of 96, hence the controller sent an error code to the operating system.

When you degraded the connection to the slower USB2, the controller allocated much less buffers for each device, therefore you could connect more disks.

The solution might be to add a USB2 hub and put on it the disks that do not need high transfer rates.

Further reading :

2
  • I thought of connecting a USB2.0 Hub that will CONVERT USB3.0 devices connection to USB2.0 protocol. But still those devices were seen using xhci only in the ker.log. Does this mean that the hub was supporting usb3.0 as well? Commented Nov 22, 2016 at 6:22
  • If you piggy-backed usb2 onto usb3, then the devices on the usb2 hub operate as usb2 even if the devices themselves can do usb3. This raises the question, to which I have no answer, whether the usb3 firmware makes the error of judging the number of required buffers by the device-properties (usb3) or by the connection speed (usb2). To find out which, you could use lsusb. See this article and this post.
    – harrymc
    Commented Nov 22, 2016 at 7:16
0

The previous answer is almost correct. There is a limit if 96 endpoints with USB3 which limits you to fewer than 32 devices. Using a USB2 hub does not fix that however because you're still using the USB3 chip in USB2 mode, and the endpoint limit remains the same, sadly.

I dealt with this problem too and it took me a while to find the real problem and solutions. It's a long page, so you can go read it there http://marc.merlins.org/perso/linux/post_2018-12-20_Getting-Around-USB3-xhci-32-Device-Limit-Max-number-of-devices-this-xHCI-host-supports-is-32.html

Basically, it boils down to these things
1) there is a 96 endpoint limit with USB3 (which translates to 32 devices only)
2) you lose further endpoints due to hubs, using a USB2 cable to a USB3 hub gives you a few slots back
3) more generally you should disable USB3 if you can do without it (remove the USB3 kernel driver, or easier if you can, disable USB3 in your bios). Using a USB3 chip in USB2 mode does not help, you have to disable the USB3 so that your motherboard reroutes the port to a USB2 controller that doesn't have that endpoint limit 4) if you cannot disable USB3, get a USB2 only PCIe card and that one will truly give you 120 devices or so.

Further resources: https://www.spinics.net/lists/linux-usb/msg175224.html
https://forums.intel.com/s/question/0D50P00004905stSAA/hardware-limitations-on-usb-endpoints-xhci?language=en_US

1
  • Is the 32 device limit per usb controller? If my computer has 2 usb controller, does it mean i can have 64 device limit? Commented Jun 24, 2021 at 3:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .