• Mathias Nyman's avatar
    xhci: fix 20000ms port resume timeout · be67d4af
    Mathias Nyman authored
    commit a54408d0 upstream.
    
    A uncleared PLC (port link change) bit will prevent furuther port event
    interrupts for that port. Leaving it uncleared caused get_port_status()
    to timeout after 20000ms while waiting to get the final port event
    interrupt for resume -> U0 state change.
    
    This is a targeted fix for a specific case where we get a port resume event
    racing with xhci resume. The port event interrupt handler notices xHC is
    not yet running and bails out early, leaving PLC uncleared.
    
    The whole xhci port resuming needs more attention, but while working on it
    it anyways makes sense to always ensure PLC is cleared in get_port_status
    before setting a new link state and waiting for its completion.
    Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    be67d4af
xhci-hub.c 46.9 KB