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 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.

>> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
>> index 592fe7e..bbc3934 100644
>> --- a/drivers/usb/host/xhci-pci.c
>> +++ b/drivers/usb/host/xhci-pci.c
>> @@ -50,6 +50,8 @@ static int xhci_pci_setup(struct usb_hcd *hcd)
>>  	struct pci_dev		*pdev = to_pci_dev(hcd->self.controller);
>>  	int			retval;
>>  
>> +	hcd->self.sg_tablesize = 2048;
>> +
> 
> Please set this to (TRBS_PER_SEGMENT - 1).  It's not a very big number
> (currently 63).  I haven't added dynamic transfer ring resizing yet, so
> there's only 63 TRBs to map to sg list entries.

Will do.

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.

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