]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
USB: xhci: Limit bus sg_tablesize to 62 TRBs.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Tue, 18 May 2010 23:05:21 +0000 (16:05 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:15:43 +0000 (11:15 -0700)
commit bc88d2eba5e19d10dd546e428314909d889b3b6a upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci-pci.c

index e097008d6fb1afe9cf8269721b60265ac2115970..4361b2dda1a4eed2d08fc90cb16b7f9468e2cf48 100644 (file)
@@ -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 +