summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
authorxiao jin <jin.xiao@intel.com>2013-10-11 00:57:03 (GMT)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2013-10-16 19:24:23 (GMT)
commitd194c031994d3fc1038fa09e9e92d9be24a21921 (patch)
tree9f5cd40b61aa8b7294f948f3ad3bfe08899afce7 /drivers/usb/host/xhci.c
parent5f20cf12a63650afe1871c7b2c89ee84ec3c6182 (diff)
downloadlinux-fsl-qoriq-d194c031994d3fc1038fa09e9e92d9be24a21921.tar.xz
xhci: correct the usage of USB_CTRL_SET_TIMEOUT
The usage of USB_CTRL_SET_TIMEOUT in xhci is incorrect. The definition of USB_CTRL_SET_TIMEOUT is 5000ms. The input timeout to wait_for_completion_interruptible_timeout is jiffies. That makes the timeout be longer than what we want, such as 50s in some platform. The patch is to use XHCI_CMD_DEFAULT_TIMEOUT instead of USB_CTRL_SET_TIMEOUT as command completion event timeout. Signed-off-by: xiao jin <jin.xiao@intel.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index e7571c9..d3f6abb 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3447,7 +3447,7 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)
/* Wait for the Reset Device command to finish */
timeleft = wait_for_completion_interruptible_timeout(
reset_device_cmd->completion,
- USB_CTRL_SET_TIMEOUT);
+ XHCI_CMD_DEFAULT_TIMEOUT);
if (timeleft <= 0) {
xhci_warn(xhci, "%s while waiting for reset device command\n",
timeleft == 0 ? "Timeout" : "Signal");