usb: host: xhci: Replace msleep with usleep_range
Since usleep_range provides better accuracy in comparison to msleep. This helps in reducing the latency of host bus resume. Change-Id: Id22104b9e5b63153731df9eb55759de9a86128c6 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
parent
cd316285c5
commit
ab1ac1288b
1 changed files with 2 additions and 2 deletions
|
@ -1165,7 +1165,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
|
||||||
xhci_set_link_state(xhci, port_array, wIndex,
|
xhci_set_link_state(xhci, port_array, wIndex,
|
||||||
XDEV_RESUME);
|
XDEV_RESUME);
|
||||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||||
msleep(20);
|
usleep_range(21000, 21500);
|
||||||
spin_lock_irqsave(&xhci->lock, flags);
|
spin_lock_irqsave(&xhci->lock, flags);
|
||||||
xhci_set_link_state(xhci, port_array, wIndex,
|
xhci_set_link_state(xhci, port_array, wIndex,
|
||||||
XDEV_U0);
|
XDEV_U0);
|
||||||
|
@ -1409,7 +1409,7 @@ int xhci_bus_resume(struct usb_hcd *hcd)
|
||||||
|
|
||||||
if (need_usb2_u3_exit) {
|
if (need_usb2_u3_exit) {
|
||||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||||
msleep(20);
|
usleep_range(21000, 21500);
|
||||||
spin_lock_irqsave(&xhci->lock, flags);
|
spin_lock_irqsave(&xhci->lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue