Re: [PATCH 1/2] usb: make urb scatter-gather support more generic

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

 



Sarah Sharp wrote:
> On Mon, Aug 24, 2009 at 06:26:26PM +0100, David Vrabel wrote:
>> Sarah Sharp wrote:
>>> On Mon, Aug 24, 2009 at 03:54:16PM +0000, David Vrabel wrote:
>>>> The WHCI HCD will also support urbs with scatter-gather lists.  Add a
>>>> usb_bus field to indicated how many sg list elements are supported by
>>>> the HCD.  Use this to decide whether to pass the scatter-list to the HCD
>>>> or not.
>>>>
>>>> Always use scatter-gather urbs where possible, regardless of the
>>>> endpoint type.  If the scatter-gather list doesn't have suitably sized
>>>> elements for a particular endpoint type then splitting it up into
>>>> separate urbs won't help.
>>> Does this mean control URBs may have a scatter gather list?  The xHCI
>>> driver can't currently handle that.
>> Control transfers with sg lists is not something that would work with
>> ehci, ohci or uhci either as the single transfer would be turned into
>> several independent control transfers.
> 
> Ah, so usb_sg_init() should never be called for a control transfer?

Yeah, the documentation should probably mention this explicitly.

>> I've not looked at the xhci spec but rather than dynamically resizing
>> the transfer ring, can you reuse entries in it as they are consumed?
>> This would be analogous to what the whci-hcd driver does.
> 
> Yes, the xHCI driver can reuse entries in the transfer ring as the
> hardware completes the transfers.  I would only need dynamic ring
> resizing if pending transfers were taking up the ring, or if a driver
> tried to enqueue a very large sglist.

You don't necessarily have to queue transfers to the hardware
structures.  For example, the whci-hcd driver queues transfers onto a
software only list first, before moving them to the hardware structures
as space becomes available.

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