Felipe, On Wed, Feb 11, 2015 at 2:03 PM, Felipe Balbi <balbi@xxxxxx> wrote: > On Wed, Feb 11, 2015 at 12:54:52PM -0600, Bin Liu wrote: >> Peter, >> >> On Tue, Feb 10, 2015 at 10:08 PM, Peter Stuge <peter@xxxxxxxx> wrote: >> > Bin Liu wrote: >> >> I have a ARM SoC which has a dwc3 drd controller, to validate if there >> >> is a limit of max device connections, I connected multiple hubs, then >> >> keyboards and mice. >> >> >> >> When plugged in the 32th device, xHCI shows the following message and >> >> the numeration failed. >> >> >> >> Not enough host controller resources for new device state. >> >> can't set config #1, error -12 >> >> >> >> Then plugging in more keyboards or mice, this message always happened. >> >> But then MSC devices were still enumerated correctly at this point. So >> >> it seems the issue is only related to interrupt transfers? >> >> >> >> I am trying to understand if this is hardware or xHCI driver >> >> limitation. Anyone has any pointers how to debug this issue? >> > >> > I don't know if it is the reason for what you experience above, but >> > xHCI allows for host controller hardware to limit the number of >> > devices that can successfully be attached - which IMO permits xHCI >> > host controllers to be generally incompatible with the USB >> > specification. >> > >> > http://marc.info/?l=linux-usb&m=139654353325844 >> >> Thanks for the pointer. I checked HCSPARAMS1 register on my platform, >> its value is 0x02000440, which means it has 64 device slots. So I >> think my issue is on elsewhere. >> >> Keep looking... > > no, you're hitting the limit alright :-) You said it dies after the 32nd > device right ? I think each device is taking up 2 slots. I am still reading, I thought each device takes one slot. Also MSC device still got enumerated after keyboard failed, that is why I don't think this is slot limitation problem. The failure point varies in my test, sometimes it failed at 32nd, sometimes at 28th. > > Just a guess, probably worth counting how many slots are used by each > device. Trying to figure out where to patch the driver... The error message means ep configuration failed, trying to understand what ep means in xhci, I don't it is the same as that in musb... The SoC datasheet says the dwc3 has 15-in + 15-out eps, plus ep0. Regards, -Bin. > > -- > balbi -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html