Skip to content

Commit

Permalink
USB: xhci: Limit bus sg_tablesize to 62 TRBs.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sarah Sharp authored and Greg Kroah-Hartman committed May 20, 2010
1 parent 1624ae1 commit bc88d2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/host/xhci-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 +
Expand Down

0 comments on commit bc88d2e

Please sign in to comment.