summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorSarah Sharp2010-05-19 01:05:21 +0200
committerGreg Kroah-Hartman2010-05-20 22:21:30 +0200
commitbc88d2eba5e19d10dd546e428314909d889b3b6a (patch)
tree354465451aeaf0d1fd06ec82a44a13509334afa0 /drivers/usb/host
parentUSB: xhci: Fix issue with set interface after stall. (diff)
downloadkernel-qcow2-linux-bc88d2eba5e19d10dd546e428314909d889b3b6a.tar.gz
kernel-qcow2-linux-bc88d2eba5e19d10dd546e428314909d889b3b6a.tar.xz
kernel-qcow2-linux-bc88d2eba5e19d10dd546e428314909d889b3b6a.zip
USB: xhci: Limit bus sg_tablesize to 62 TRBs.
When a scatter-gather list is enqueued to the xHCI driver, it translates each entry into a transfer request block (TRB). Only 63 TRBs can be used per ring segment, and there must be one additional TRB reserved to make sure the hardware does not think the ring is empty (so the enqueue pointer doesn't equal the dequeue pointer). Limit the bus sg_tablesize to 62 TRBs. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/xhci-pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 417d37aff8d7..98a73cd20cc6 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -54,7 +54,7 @@ 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 = TRBS_PER_SEGMENT - 1;
+ hcd->self.sg_tablesize = TRBS_PER_SEGMENT - 2;
xhci->cap_regs = hcd->regs;
xhci->op_regs = hcd->regs +