|
@@ -839,6 +839,7 @@ static void xhci_clear_command_ring(struct xhci_hcd *xhci)
|
|
|
int xhci_suspend(struct xhci_hcd *xhci)
|
|
|
{
|
|
|
int rc = 0;
|
|
|
+ unsigned int delay = XHCI_MAX_HALT_USEC;
|
|
|
struct usb_hcd *hcd = xhci_to_hcd(xhci);
|
|
|
u32 command;
|
|
|
|
|
@@ -861,8 +862,12 @@ int xhci_suspend(struct xhci_hcd *xhci)
|
|
|
command = xhci_readl(xhci, &xhci->op_regs->command);
|
|
|
command &= ~CMD_RUN;
|
|
|
xhci_writel(xhci, command, &xhci->op_regs->command);
|
|
|
+
|
|
|
+ /* Some chips from Fresco Logic need an extraordinary delay */
|
|
|
+ delay *= (xhci->quirks & XHCI_SLOW_SUSPEND) ? 10 : 1;
|
|
|
+
|
|
|
if (xhci_handshake(xhci, &xhci->op_regs->status,
|
|
|
- STS_HALT, STS_HALT, XHCI_MAX_HALT_USEC)) {
|
|
|
+ STS_HALT, STS_HALT, delay)) {
|
|
|
xhci_warn(xhci, "WARN: xHC CMD_RUN timeout\n");
|
|
|
spin_unlock_irq(&xhci->lock);
|
|
|
return -ETIMEDOUT;
|