aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/message.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2009-08-24 09:44:30 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 14:55:14 -0500
commit4c1bd3d7a7d114dabd58f62f386ac4bfd268be1f (patch)
tree1c8d7d6df693c71ac0b3dcc4124498d91c939f2d /drivers/usb/core/message.c
parent09ce497e79a930ac4912d6bc295baab82b39f8ab (diff)
USB: make urb scatter-gather support more generic
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. Make the usb-storage driver use this new field. Signed-off-by: David Vrabel <david.vrabel@csr.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/message.c')
-rw-r--r--drivers/usb/core/message.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index e80f1af438c8..8d874cad6581 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -393,13 +393,7 @@ int usb_sg_init(struct usb_sg_request *io, struct usb_device *dev,
393 if (io->entries <= 0) 393 if (io->entries <= 0)
394 return io->entries; 394 return io->entries;
395 395
396 /* If we're running on an xHCI host controller, queue the whole scatter 396 if (dev->bus->sg_tablesize > 0) {
397 * gather list with one call to urb_enqueue(). This is only for bulk,
398 * as that endpoint type does not care how the data gets broken up
399 * across frames.
400 */
401 if (usb_pipebulk(pipe) &&
402 bus_to_hcd(dev->bus)->driver->flags & HCD_USB3) {
403 io->urbs = kmalloc(sizeof *io->urbs, mem_flags); 397 io->urbs = kmalloc(sizeof *io->urbs, mem_flags);
404 use_sg = true; 398 use_sg = true;
405 } else { 399 } else {