============================================================================
@@ -923,6 +923,15 @@ int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup)
command &= ~CMD_RUN;
writel(command, &xhci->op_regs->command);
+ /*
+ * The STS_HALT is not set until the CRR is cleared on specific
+ * xHCI controllers (e.g. R-Car SoCs) after this driver set the R/S
+ * to 0. So, to avoid using a quirks XHCI_SLOW_SUSPEND, this driver
+ * waits for the CRR to clear using xhci_handshake().
+ */
+ xhci_handshake(&xhci->op_regs->cmd_ring, CMD_RING_RUNNING, 0,
+ 5 * 1000 * 1000);
+
/* Some chips from Fresco Logic need an extraordinary delay */
delay *= (xhci->quirks & XHCI_SLOW_SUSPEND) ? 10 : 1;
============================================================================