Re: Device configuration fails on superspeed, succeeds on highspeed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 16, 2012 at 04:49:42PM -0500, Alan Stern wrote:
> On Sun, 16 Dec 2012, Vincent Pelletier wrote:
> 
> > Hi.
> > 
> > I have a device which enumerates properly on this superspeed host controler:
> > 
> > 06:00.0 USB controller: Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev 01)
> > 
> > but triggers several warnings from the xhci_hcd module, and ultimately fails
> > activating the default configuration:
> > 
> > usb 1-1: new high-speed USB device number 6 using xhci_hcd
> > usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x1 has invalid maxpacket 64
> > usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 64
> > usb 1-1: New USB device found, idVendor=16c0, idProduct=07a9
> > usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> > usb 1-1: Product: USB Analyzer 1480A

It's ironic that a USB bus analyzer doesn't follow the USB 2.0
specification...

> > usb 1-1: Manufacturer: International Test Instruments
> > usb 1-1: ep 0x1 - rounding interval to 32768 microframes, ep desc says 0 microframes
> > usb 1-1: ep 0x81 - rounding interval to 32768 microframes, ep desc says 0 microframes
> > usb 1-1: ep 0x82 - rounding interval to 32768 microframes, ep desc says 0 microframes
> > usb 1-1: ep 0x4 - rounding interval to 32768 microframes, ep desc says 0 microframes
> > usb 1-1: ep 0x86 - rounding interval to 32768 microframes, ep desc says 0 microframes
> > usb 1-1: ep 0x88 - rounding interval to 32768 microframes, ep desc says 0 microframes
> > xhci_hcd 0000:02:00.0: ERROR: unexpected command completion code 0x11.
> > usb 1-1: can't set config #1, error -22
> > 
> > So at this point, this device is unusable with xhci_hcd.
> > 
> > I checked the specs, and the warnings about wMaxPacketSize seem
> > justified (although it's unclear to me wether wMaxPacketSize is
> > restricted to exactly 512B in HS, or only upper-bound at 512B).
> 
> It's supposed to be exactly 512 bytes.
> 
> >  I'm less
> > sure about the bInterval ones, 0 is specified as a possible value
> > (reading the 2.0 specs, that is).
> 
> Those messages are a bug.  xhci_get_endpoint_interval() includes a
> comment about 0 being a valid bInterval value, but the code fails to
> take it into account.

Thanks for catching that, Alan.  I'll send a patch for Vincent to test
shortly.

> > As for the final 0x11 (aka COMP_EINVAL),
> > I don't know what the cause is.
> 
> My guess is that it is caused by the invalid wMaxPacketSize values.  
> But that's just a guess.

The 0x11 return value means the xHCI host controller didn't like the
endpoint context values that the xHCI driver filled in.  It could be
caused by the wMaxPacketSize value, or perhaps we're overwriting other
bits of the endpoint context by setting the interval to a very large
value.

Alan, what does the EHCI scheduler do if the HS device's wMaxPacketSize
is set to 64 bytes?  Happily schedule 64 byte transfers?  Or will it
schedule 512 byte packets since that's the only allowed type for HS bulk
endpoints?

I can unconditionally set the HS bulk wMaxPacketSize to 512 bytes, but
I'm not sure that will work with this device.

Sarah Sharp
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux