Re: USB: Fix usb_fill_int_urb for SuperSpeed and Wireless

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

 



Matthew Wilcox wrote:
> On Tue, Mar 02, 2010 at 08:24:15PM +0000, David Vrabel wrote:
>> Sarah Sharp wrote:
>>> From: Matthew Wilcox <willy@xxxxxxxxxxxxxxx>
>>>
>>> USB 3 and Wireless USB specify a logarithmic encoding of the endpoint
>>> interval that matches the USB 2 specification.  usb_fill_int_urb()
>>> didn't know that and was filling in the interval as if it was USB 1.1.
>>> As noted in the updated comment, Wireless USB uses 128us instead of 125us,
>>> but it's still logarithmic.
>> The rest of the  system requires that urb->interval for WUSB urbs uses
>> the bInterval encoding.  So don't change this function for WUSB.
> 
> That, um, doesn't seem like the best design decision.  It seems to me
> that we should have a consistent encoding in urb->interval no matter what
> the underlying *hci is.  Whether that means that USB2 should be changed,
> or WUSB should be changed (and at this point, I have no idea whether USB3
> is doing the right thing or not), I really don't have a strong opinion.
> But I do think that USB2, WUSB and USB3 should do the _same_ thing.

The decoded value isn't helpful in the WUSB case.

If you want consistency you can make urb->interval use the encoded
bInterval value.

Or, even better, get rid of the field entirely and have HCDs look up the
interval in the endpoint (something like urb->ep->descriptor->bInterval).

David
-- 
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park,  Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ                 http://www.csr.com/


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
--
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