diff options
author | Basavaraj Natikar <Basavaraj.Natikar@amd.com> | 2023-04-28 19:30:55 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-13 17:33:18 +0900 |
commit | 1f7d5520719dd1fed1a2947679f6cc26a55f1e6b (patch) | |
tree | 5e9eaf10a3343e074fef6dab74b4348d2257175d /drivers/usb/host/ehci-pci.c | |
parent | 986866c3dfb0f930c5cc109a6c509c1391d96b5f (diff) | |
download | linux-stable-1f7d5520719dd1fed1a2947679f6cc26a55f1e6b.tar.gz linux-stable-1f7d5520719dd1fed1a2947679f6cc26a55f1e6b.tar.bz2 linux-stable-1f7d5520719dd1fed1a2947679f6cc26a55f1e6b.zip |
USB: Extend pci resume function to handle PM events
Currently, the pci_resume method has only a flag indicating whether the
system is resuming from hibernation. In order to handle all PM events like
AUTO_RESUME (runtime resume from device in D3), RESUME (system resume from
s2idle, S3 or S4 states) etc change the pci_resume method to handle all PM
events.
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20230428140056.1318981-2-Basavaraj.Natikar@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-pci.c')
-rw-r--r-- | drivers/usb/host/ehci-pci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index 4b148fe5e43b..889dc4426271 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -354,10 +354,11 @@ done: * Also they depend on separate root hub suspend/resume. */ -static int ehci_pci_resume(struct usb_hcd *hcd, bool hibernated) +static int ehci_pci_resume(struct usb_hcd *hcd, pm_message_t msg) { struct ehci_hcd *ehci = hcd_to_ehci(hcd); struct pci_dev *pdev = to_pci_dev(hcd->self.controller); + bool hibernated = (msg.event == PM_EVENT_RESTORE); if (ehci_resume(hcd, hibernated) != 0) (void) ehci_pci_reinit(ehci, pdev); |