mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 09:41:54 +09:00
xhci: Reset reserved command ring TRBs on cleanup.
commit33b2831ac8upstream. 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 commit913a8a344f"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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1a4573e4e0
commit
c97ecdcfde
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user