This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

More than 6 CDC USB devices runs out of endpoints on BeagleBone

I connected 6 USB CDC devices to a Linux system running on an AM335x. When I run an application that reads from each /dev/ttyACMx device, each CDC device appears to claim a number of input endpoints from the Linux musb driver.  I then get this error repeatedly:

[ 1809.104644] cdc_acm 1-1.1.3:1.0: acm_tty_open - usb_submit_urb(ctrl irq) failed

There are a maximum of 15 RX endpoints on this controller, so when I add the next device the MUSB Linux driver fails with a -28 error (NOSPC) to indicate no more endpoints are available.  The error message goes away as soon as I unplug the other device.
The AM335x apparently uses a Mentor Graphics USB2.0 OTG controller:

There is a high-level datasheet but no technical reference for this device:

http://www.mentor.com/products/ip/usb/usb20otg/

Questions:

How is this controller supposed to be used?  Are the hardware endpoints supposed to be reserved for the device as long as it runs, or are can they be multiplexed for more than N devices?  Another words, if the endpoint goes idle, should the kernel be able to reclaim the endpoint and use it for another device?

  • As I understand it, when a device is initially enumerated, the endpoint resources for that device are assigned by the driver and retained for the lifetime of the device. There is no dynamic rebalancing of endpoints based on idle conditions of devices.

  • I think that's generally correct.  Linux actually doesn't reserve the CDC endpoints until you open the device (e.g. open(/dev/ttyACM0).  This is why I was only able to trigger the error when the application was running.

    Would this have been an issue if the AM335x supported EHCI instead of the Mentor Graphics USB controller?  Is there any reason why the AM335x doesn't support EHCI?