xhci: Add quirk to reset host back to default state at shutdown
commit 34cd2db408d591bc15771cbcc90939ade0a99a21 upstream. Systems based on Alder Lake P see significant boot time delay if boot firmware tries to control usb ports in unexpected link states. This is seen with self-powered usb devices that survive in U3 link suspended state over S5. A more generic solution to power off ports at shutdown was attempted in commit 83810f84ecf1 ("xhci: turn off port power in shutdown") but it caused regression. Add host specific XHCI_RESET_TO_DEFAULT quirk which will reset host and ports back to default state in shutdown. Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20221024142720.4122053-3-mathias.nyman@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

부모
63c7df3c81
커밋
3b250824b6
@@ -794,9 +794,15 @@ void xhci_shutdown(struct usb_hcd *hcd)
|
||||
|
||||
spin_lock_irq(&xhci->lock);
|
||||
xhci_halt(xhci);
|
||||
/* Workaround for spurious wakeups at shutdown with HSW */
|
||||
if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
|
||||
|
||||
/*
|
||||
* Workaround for spurious wakeps at shutdown with HSW, and for boot
|
||||
* firmware delay in ADL-P PCH if port are left in U3 at shutdown
|
||||
*/
|
||||
if (xhci->quirks & XHCI_SPURIOUS_WAKEUP ||
|
||||
xhci->quirks & XHCI_RESET_TO_DEFAULT)
|
||||
xhci_reset(xhci, XHCI_RESET_SHORT_USEC);
|
||||
|
||||
spin_unlock_irq(&xhci->lock);
|
||||
|
||||
xhci_cleanup_msix(xhci);
|
||||
|
Reference in New Issue
Block a user