USB: xhci: Limit bus sg_tablesize to 62 TRBs.
commit442f1232ae1b23382c967967b05932d2660025cd
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Tue, 18 May 2010 23:05:21 +0000 (18 16:05 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:15:43 +0000 (5 11:15 -0700)
treeb33376af5824f44856cec0ac392e282846fa40cb
parenta8703df4cd58aee922d55b5b952fe4be91321a8e
USB: xhci: Limit bus sg_tablesize to 62 TRBs.

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