summaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2022-11-30 11:19:42 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-30 12:10:48 +0100
commitc3bbacd61baace2f4fbab17012c3d149df2d50f1 (patch)
treeb1413d567bc489a78559d2444619aba1fe8c4a93 /include/linux/usb
parent705c333a7ad2003ad99d96c19a31619b19ad14b9 (diff)
downloadlinux-stable-c3bbacd61baace2f4fbab17012c3d149df2d50f1.tar.gz
linux-stable-c3bbacd61baace2f4fbab17012c3d149df2d50f1.tar.bz2
linux-stable-c3bbacd61baace2f4fbab17012c3d149df2d50f1.zip
xhci: disable U3 suspended ports in S4 hibernate poweroff_late stage
Disable U3 suspended ports in hibernate S4 poweroff_late for systems with XHCI_RESET_TO_DEFAULT quirk, if wakeup is not enabled. This reduces the number of self-powered usb devices from surviving in U3 suspended state into next reboot. Bootloader/firmware on these systems can't handle usb ports in U3, and will timeout, causing extra delay during reboot/restore from S4. Add pci_poweroff_late() callback to struct usb_hcd to get this done at the correct stage in hibernate. Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20221130091944.2171610-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/hcd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index 78cd566ee238..b51c07111729 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -269,6 +269,9 @@ struct hc_driver {
/* called after entering D0 (etc), before resuming the hub */
int (*pci_resume)(struct usb_hcd *hcd, bool hibernated);
+ /* called just before hibernate final D3 state, allows host to poweroff parts */
+ int (*pci_poweroff_late)(struct usb_hcd *hcd, bool do_wakeup);
+
/* cleanly make HCD stop writing memory and doing I/O */
void (*stop) (struct usb_hcd *hcd);