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.

musb and multiple devices



I'm having a problem with a DM8168 application and using many usb devices with the musb driver.  I'm trying to connect 10 digitizing tablets into the usb bus, but when I get to about the sixth or seventh tablet the ioctl calls to submit urbs fails with error code -28 (ENOSPC).  I'm interpreting this to mean that there is no more bandwidth available, but these tablets are relatively slow speed devices so I'm surprised by this result.  Here is a list of the devices attached to the usb bus:

root@arago:~# cat /proc/bus/usb/devices

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 2.06
S:  Manufacturer=Linux 2.6.37 musb-hcd
S:  Product=MUSB HDRC host driver
S:  SerialNumber=musb-hdrc.1
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 2.06
S:  Manufacturer=Linux 2.6.37 musb-hcd
S:  Product=MUSB HDRC host driver
S:  SerialNumber=musb-hdrc.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=02 MxPS=64 #Cfgs=  1
P:  Vendor=0424 ProdID=2514 Rev= b.b3
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=01 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms
I:* If#= 0 Alt= 1 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=02 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 16 Spd=12   MxCh= 3
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=04b3 ProdID=3004 Rev= 0.01
S:  Manufacturer=Silitek
S:  Product=IBM USB HUB KEYBOARD
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms

T:  Bus=01 Lev=03 Prnt=16 Port=00 Cnt=01 Dev#= 17 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=04b3 ProdID=3003 Rev= 0.01
S:  Manufacturer=Silitek
S:  Product=IBM USB HUB KEYBOARD
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbfs
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=(none)
E:  Ad=82(I) Atr=03(Int.) MxPS=   4 Ivl=24ms

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 18 Spd=480  MxCh= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0409 ProdID=005a Rev= 1.00
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=01 Lev=03 Prnt=18 Port=00 Cnt=01 Dev#= 21 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs=  1
P:  Vendor=056a ProdID=00dd Rev= 1.02
S:  Manufacturer=Wacom Co.,Ltd.
S:  Product=CTL-470
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr= 98mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbfs
E:  Ad=81(I) Atr=03(Int.) MxPS=  10 Ivl=2ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbfs
E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=2ms

T:  Bus=01 Lev=03 Prnt=18 Port=01 Cnt=02 Dev#= 20 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=056a ProdID=00d3 Rev= 1.06
S:  Manufacturer=Wacom Co.,Ltd.
S:  Product=CTH-661
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr= 98mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbfs
E:  Ad=81(I) Atr=03(Int.) MxPS=   9 Ivl=4ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbfs
E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=4ms

T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#=  5 Spd=480  MxCh= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=05e3 ProdID=0608 Rev= 9.01
S:  Product=USB2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=01 Lev=03 Prnt=05 Port=00 Cnt=01 Dev#= 22 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=056a ProdID=0018 Rev= 1.13
S:  Manufacturer=Wacom Co.,Ltd.
S:  Product=CTE-650
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 60mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbfs
E:  Ad=81(I) Atr=03(Int.) MxPS=   9 Ivl=4ms

T:  Bus=01 Lev=03 Prnt=05 Port=01 Cnt=02 Dev#= 11 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs=  1
P:  Vendor=056a ProdID=00dd Rev= 1.02
S:  Manufacturer=Wacom Co.,Ltd.
S:  Product=CTL-470
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr= 98mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbfs
E:  Ad=81(I) Atr=03(Int.) MxPS=  10 Ivl=2ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbfs
E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=2ms

T:  Bus=01 Lev=03 Prnt=05 Port=02 Cnt=03 Dev#= 12 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs=  1
P:  Vendor=056a ProdID=00dd Rev= 1.02
S:  Manufacturer=Wacom Co.,Ltd.
S:  Product=CTL-470
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr= 98mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbfs
E:  Ad=81(I) Atr=03(Int.) MxPS=  10 Ivl=2ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbfs
E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=2ms

T:  Bus=01 Lev=03 Prnt=05 Port=03 Cnt=04 Dev#= 13 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=056a ProdID=00d8 Rev= 1.12
S:  Manufacturer=Wacom Co.,Ltd.
S:  Product=CTH-661
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr= 98mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbfs
E:  Ad=81(I) Atr=03(Int.) MxPS=   9 Ivl=4ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbfs
E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=4ms

There's more than just the digitizing tablets because of hubs, a keyboard, and a touch screen.

Debug messages don't really report anything other than the fact that a -28 error occurred (ENOSPC) and something about descriptors being popped from the teardown completion queue.

I need this system to be able to work with a lot of user interface devices such as touch screens, digitizing tablets, keyboards, mice, etc.  By a lot we need to be able to reliably use up to 20 devices.

Is there an update to the musb driver?

Any suggestions?

Carl

  • I need some help here, but I'm getting no response.  Is someone even looking at this issue?

    Further investigation seems to indicate that the musb host controller can only handle 16 devices at a time.  This seems to be a limitation in the hardware.  As requests for data from different devices come in urbs get allocated and i/o slots in the musb host controller are used for those transfers.  If data from more than 16 endpoints at once is requested then the host controller returns the ENOSPC error.  The problem is that you can have 16 devices (including hubs) which are doing an IN, but if there's no data available from the device it gets a NACK but doesn't remove the request.  It continually does an IN until it receives data.  This means that you could have 16 slots used up in the host controller and none of them are transmitting data.  You now can't receive data from a 17th device because there aren't anymore slots available even though you might have data coming from that device.

    I tried getting around this problem by creating a queue of transfers, submitting a transfer and, if there's no response for 10 milliseconds, cancelling the transfer and moving on to the next one.  This works for awhile (several hours) but eventually the entire USB interface stops sending any data at all.

    Does anyone have any suggestions?

    Carl