aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/pci-host-common.c
diff options
context:
space:
mode:
authorThéo Lebrun <[email protected]>2025-02-05 17:36:52 +0000
committerGreg Kroah-Hartman <[email protected]>2025-03-14 08:18:02 +0000
commit34cca0ceab5ba34a7cfaa32bbca5eb7abb85622b (patch)
treef3c60f43ccf3b77a21c22d1a2186dd149a36aa17 /drivers/pci/controller/pci-host-common.c
parentusb: cdns3-ti: run HW init at resume() if HW was reset (diff)
downloadkernel-34cca0ceab5ba34a7cfaa32bbca5eb7abb85622b.tar.gz
kernel-34cca0ceab5ba34a7cfaa32bbca5eb7abb85622b.zip
usb: xhci: change xhci_resume() parameters to explicit the desired info
Previous signature was: int xhci_resume(struct xhci_hcd *xhci, pm_message_t msg); Internally, it extracted two information out of the message: - whether we are after hibernation: msg.event == PM_EVENT_RESTORE, - whether this is an auto resume: msg.event == PM_EVENT_AUTO_RESUME. First bulletpoint is somewhat wrong: driver wants to know if the device did lose power, it doesn't care about hibernation per se. Knowing that, refactor to ask upper layers the right questions: (1) "did we lose power?" and, (2) "is this an auto resume?". Change the signature to: int xhci_resume(struct xhci_hcd *xhci, bool power_lost, bool is_auto_resume); The goal is to allow some upper layers (cdns3-plat) to tell us when power was lost after system-wise suspend. Note that lost_power is ORed at the start of xhci_resume() to xhci->quirks & XHCI_RESET_ON_RESUME || xhci->broken_suspend. It is simpler to keep those checks inside of xhci_resume() instead of doing them at each caller of xhci_resume(). Signed-off-by: Théo Lebrun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/pci/controller/pci-host-common.c')
0 files changed, 0 insertions, 0 deletions