Hi Looking for comments on an issue where a self-powered usb device can survive in suspended U3 state even if the host system is restarted. This causes additional boot delay as boot firmware is not designed to handle usb devices in U3. Boot firmware waits for a usb state change in vain until it times out. In shutdown (S5), with xHCI as host, this can be solved fairly easily by turning off roothub port power in the .shutdown path. This is discussed in xhci spec 4.19.4 for driver unload: "Before the xHC driver is unloaded, the driver should clear the Port Power (PP) flag of all Root Hub ports to place them into the Disabled state and reduce port power consumption." But for S4 hibernate things get more complicated. We can't just turn off port power, especially if the usb device can generate remote wake, and host should resume the system from S4. But I can't come up with a better solution, so this RFC patch does exactly that. It turns off port power for xHC roothub ports in the hibernate poweroff_late stage, but only if the host isn't set to wake up the system from S4. This RFC workaround is specific to PCI xHC hosts, but if this solution makes sense at all, shuold it be turned into a more generic solution? Maybe calling hc_driver hcd->port_power(hcd, i, false) for each roothub port in dev_pm_ops usb_hcd_pci_pm_ops .poweroff or .poweroff_late callbacks? Mathias Nyman (1): xhci: pci: power off roothub ports in hibernate poweroff_late stage drivers/usb/host/xhci-hub.c | 4 ++-- drivers/usb/host/xhci-pci.c | 32 +++++++++++++++++++++++++++++++- drivers/usb/host/xhci.h | 2 ++ 3 files changed, 35 insertions(+), 3 deletions(-) -- 2.25.1