usb/uhci: initialize sg_table properly
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 13 Jan 2012 18:04:17 +0000 (19:04 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 Jan 2012 22:30:23 +0000 (14:30 -0800)
Commit 689d6eac ("USB: UHCI: add native scatter-gather support(v1))
added sg support to uhci but forgot to set the sg_table so this feature
remained unused.

Cc: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/uhci-hcd.c

index 6b5eb1017e2ca601044e3d1856d87070b0d21328..e37dea87bb5633fe8d88b77f443edb761f1aa584 100644 (file)
@@ -565,6 +565,9 @@ static int uhci_start(struct usb_hcd *hcd)
        struct dentry __maybe_unused *dentry;
 
        hcd->uses_new_polling = 1;
+       /* Accept arbitrarily long scatter-gather lists */
+       if (!(hcd->driver->flags & HCD_LOCAL_MEM))
+               hcd->self.sg_tablesize = ~0;
 
        spin_lock_init(&uhci->lock);
        setup_timer(&uhci->fsbr_timer, uhci_fsbr_timeout,