lkml.org 
[lkml]   [2021]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subjectusb: host: Reduce xhci_handshake timeout in xhci_reset
    Date
    It seems 10 secs timeout is too long in general case. A core would wait for
    10 secs without doing other task and it can be happended on every device.
    It's better to reduce timeout for general case and use new quirk if needed.

    Signed-off-by: Daehwan Jung <dh10.jung@samsung.com>
    ---
    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 9248ce8..0a1b6be 100644
    --- a/drivers/usb/host/xhci.c
    +++ b/drivers/usb/host/xhci.c
    @@ -196,7 +196,7 @@ int xhci_reset(struct xhci_hcd *xhci)
    udelay(1000);

    ret = xhci_handshake(&xhci->op_regs->command,
    - CMD_RESET, 0, 10 * 1000 * 1000);
    + CMD_RESET, 0, 1 * 1000 * 1000);
    if (ret)
    return ret;

    @@ -210,7 +210,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, 1 * 1000 * 1000);

    xhci->usb2_rhub.bus_state.port_c_suspend = 0;
    xhci->usb2_rhub.bus_state.suspended_ports = 0;
    --
    2.7.4
    \
     
     \ /
      Last update: 2021-06-22 13:39    [W:2.344 / U:0.492 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site