From: Sebastian Andrzej Siewior Date: Fri, 13 Jan 2012 18:04:17 +0000 (+0100) Subject: usb/uhci: initialize sg_table properly X-Git-Tag: MMI-PSA29.97-13-9~17266^2~22^2~121^2~29 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2851784f4d820bc697a8cc608509f9e3975c80e5;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git usb/uhci: initialize sg_table properly 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 Signed-off-by: Sebastian Andrzej Siewior Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 6b5eb1017e2c..e37dea87bb56 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c @@ -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,