aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-mem.c
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2012-05-08 07:09:26 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-01 15:12:58 +0800
commitc97ecdcfde93b2b05a0e5f3b5eaaf38e750337ae (patch)
treebe76f31d24bdff170fa43662a26f350de3f94cdd /drivers/usb/host/xhci-mem.c
parent1a4573e4e0bb86436881b7120a80cfb63d647a0f (diff)
downloadkernel_samsung_smdk4412-c97ecdcfde93b2b05a0e5f3b5eaaf38e750337ae.zip
kernel_samsung_smdk4412-c97ecdcfde93b2b05a0e5f3b5eaaf38e750337ae.tar.gz
kernel_samsung_smdk4412-c97ecdcfde93b2b05a0e5f3b5eaaf38e750337ae.tar.bz2
xhci: Reset reserved command ring TRBs on cleanup.
commit 33b2831ac870d50cc8e01c317b07fb1e69c13fe1 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r--drivers/usb/host/xhci-mem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index a4468d9..b455f4c 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1520,6 +1520,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
xhci->event_ring = NULL;
xhci_dbg(xhci, "Freed event ring\n");
+ xhci->cmd_ring_reserved_trbs = 0;
if (xhci->cmd_ring)
xhci_ring_free(xhci, xhci->cmd_ring);
xhci->cmd_ring = NULL;