diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-05-08 10:09:26 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-05-18 18:41:51 -0400 |
commit | 33b2831ac870d50cc8e01c317b07fb1e69c13fe1 (patch) | |
tree | af10fc67df911b3ccd02e455b87f668613098986 /drivers/usb/host/xhci-mem.c | |
parent | f8a9e72d125f4e00ec529ba67b674321a1f3bf31 (diff) |
xhci: Reset reserved command ring TRBs on cleanup.
When the xHCI driver needs to clean up memory (perhaps due to a failed
register restore on resume from S3 or resume from S4), it needs to reset
the number of reserved TRBs on the command ring to zero. Otherwise,
several resume cycles (about 30) with a UAS device attached will
continually increment the number of reserved TRBs, until all command
submissions fail because there isn't enough room on the command ring.
This patch should be backported to kernels as old as 2.6.32,
that contain the commit 913a8a344ffcaf0b4a586d6662a2c66a7106557d
"USB: xhci: Change how xHCI commands are handled."
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 0b5ff2618de7..497ed7723e44 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -1815,6 +1815,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) | |||
1815 | xhci->event_ring = NULL; | 1815 | xhci->event_ring = NULL; |
1816 | xhci_dbg(xhci, "Freed event ring\n"); | 1816 | xhci_dbg(xhci, "Freed event ring\n"); |
1817 | 1817 | ||
1818 | xhci->cmd_ring_reserved_trbs = 0; | ||
1818 | if (xhci->cmd_ring) | 1819 | if (xhci->cmd_ring) |
1819 | xhci_ring_free(xhci, xhci->cmd_ring); | 1820 | xhci_ring_free(xhci, xhci->cmd_ring); |
1820 | xhci->cmd_ring = NULL; | 1821 | xhci->cmd_ring = NULL; |