Tool/software: Linux
We have a large number of serial over usb devices that our host software needs to actively communicate with. We are using an AM3358 and are on TISDK version 05.00.00.15.
The USB device tree is as follows:
/: Bus 01.Port 1: Dev 1, class="root_hub", Driver=musb-hdrc/1p, 480M
|__ Port 1: Dev 2, If 0, class="Hub", Driver=hub/7p, 480M
|__ Port 1: Dev 8, If 0, class="Hub", Driver=hub/2p, 12M
|__ Port 2: Dev 10, If 1, class="CDC" Data, Driver=cdc_acm, 12M
|__ Port 2: Dev 10, If 0, class="Communications", Driver=cdc_acm, 12M
|__ Port 1: Dev 9, If 0, class="Communications", Driver=cdc_acm, 12M
|__ Port 1: Dev 9, If 1, class="CDC" Data, Driver=cdc_acm, 12M
|__ Port 2: Dev 5, If 0, class="Hub", Driver=hub/2p, 480M
|__ Port 1: Dev 6, If 1, class="CDC" Data, Driver=cdc_ether, 480M
|__ Port 1: Dev 6, If 0, class="Communications", Driver=cdc_ether, 480M
|__ Port 2: Dev 11, If 0, class="Communications", Driver=cdc_acm, 12M
|__ Port 2: Dev 11, If 1, class="CDC" Data, Driver=cdc_acm, 12M
|__ Port 4: Dev 7, If 1, class="CDC" Data, Driver=cdc_acm, 480M
|__ Port 4: Dev 7, If 0, class="Communications", Driver=cdc_acm, 480M
|__ Port 5: Dev 13, If 0, class="Hub", Driver=hub/4p, 480M
|__ Port 4: Dev 14, If 0, class="Communications", Driver=cdc_acm, 12M
|__ Port 4: Dev 14, If 1, class="CDC" Data, Driver=cdc_acm, 12M
|__ Port 6: Dev 12, If 0, class="Communications", Driver=cdc_acm, 12M
|__ Port 6: Dev 12, If 1, class="CDC" Data, Driver=cdc_acm, 12M
From reading the USB descriptors, all these devices require 1 Interrupt EP IN, 1 Bulk EP IN, and 1 Bulk EP OUT.
When trying to open each ACM device one at a time, I hit a wall on the last device and the following error appears in dmesg.
[ 815.079232] musb-hdrc musb-hdrc.1: int hwep alloc failed for 1x64
[ 815.079232] musb-hdrc musb-hdrc.1: int[ 815.090737] cdc_acm 1-1.1.1:1.0: acm_port_activate - usb_submit_urb(ctrl irq) failed hwep alloc failed for 1x64
[ 815.090737] cdc_acm 1-1.1.1:1.0: acm_port_activate - usb_submit_urb(ctrl irq) failed
I've read through some of the past forum posts about device quantity limits specific to interrupt endpoints. Since I need two EP IN per device, the endpoints into the host are my limiting factor.
Counting my EP INs, I see:
4 Hubs
1 ECM Device
6 ACM Devices
It looks like the EPs for the ACM devices are allocated when the device is opened from user space. The ECM device's EP is allocated when it connects (in my case during startup).
Reading throught the driver it seems to indicate that there will be multiplexing of bulk endpoints on EP1 once all other available endpoints are exhausted, so I don't quite understand why I hit the limit when I do.
Assuming EP0 is reserved for control, that leaves 3 potential EPs for dedicated bulk transfers plus EP1 for multiplexing the rest.
Am I missing something fundamental here?