From a65ee977ad642121d4b659f3c668e1f62ac0cceb Mon Sep 17 00:00:00 2001 From: Pratham Pratap Date: Thu, 5 Sep 2019 21:14:58 +0530 Subject: [PATCH] usb: xhci: Reduce command reset handshake timeout Command reset handshake is currently perfomed with local irq disabled and spinlock held for 10 sec timeout. In this case xHC becomes unresponsive and results into watchdog bark. Hence reduce timeout value from 10 sec to 1 sec to initiate recovery faster. Change-Id: I9c6682c3f31386033b258d7d4c104f775ec37f1d Signed-off-by: Pratham Pratap --- drivers/usb/host/xhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index ab3be847f759..7a43e64095f6 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -226,7 +226,7 @@ int xhci_reset(struct xhci_hcd *xhci) udelay(1000); ret = xhci_handshake_check_state(xhci, &xhci->op_regs->command, - CMD_RESET, 0, 10 * 1000 * 1000); + CMD_RESET, 0, 1000 * 1000); if (ret) return ret; @@ -240,7 +240,7 @@ int xhci_reset(struct xhci_hcd *xhci) * than status until the "Controller Not Ready" flag is cleared. */ ret = xhci_handshake(&xhci->op_regs->status, - STS_CNR, 0, 10 * 1000 * 1000); + STS_CNR, 0, 1000 * 1000); xhci->usb2_rhub.bus_state.port_c_suspend = 0; xhci->usb2_rhub.bus_state.suspended_ports = 0;