@@ -1505,8 +1505,7 @@ static int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
goto done;
}
ep->ep_state |= EP_STOP_CMD_PENDING;
- ep->stop_cmd_timer.expires = jiffies +
- XHCI_STOP_EP_CMD_TIMEOUT * HZ;
+ ep->stop_cmd_timer.expires = jiffies + XHCI_STOP_EP_CMD_TIMEOUT;
add_timer(&ep->stop_cmd_timer);
xhci_queue_stop_endpoint(xhci, command, urb->dev->slot_id,
ep_index, 0);
@@ -1518,7 +1518,7 @@ struct xhci_td {
};
/* xHCI command default timeout value */
-#define XHCI_CMD_DEFAULT_TIMEOUT (5 * HZ)
+#define XHCI_CMD_DEFAULT_TIMEOUT (msecs_to_jiffies(5000))
/* command descriptor */
struct xhci_cd {
@@ -1630,8 +1630,8 @@ struct urb_priv {
#define ERST_ENTRIES 1
/* Poll every 60 seconds */
#define POLL_TIMEOUT 60
-/* Stop endpoint command timeout (secs) for URB cancellation watchdog timer */
-#define XHCI_STOP_EP_CMD_TIMEOUT 5
+/* Stop endpoint command timeout (jiffies) for URB cancellation watchdog timer */
+#define XHCI_STOP_EP_CMD_TIMEOUT (msecs_to_jiffies(5000))
/* XXX: Make these module parameters */
struct s3_save {
HZ can change based on CPUFreq. We should use msecs_to_jiffies() instead. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> --- drivers/usb/host/xhci.c | 3 +-- drivers/usb/host/xhci.h | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-)