]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
usb: core: Add PM runtime calls to usb_hcd_platform_shutdown
authorTony Lindgren <tony@atomide.com>
Fri, 22 Mar 2019 21:54:05 +0000 (14:54 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 13 Aug 2019 12:11:36 +0000 (14:11 +0200)
BugLink: https://bugs.launchpad.net/bugs/1837517
[ Upstream commit 8ead7e817224d7832fe51a19783cb8fcadc79467 ]

If ohci-platform is runtime suspended, we can currently get an "imprecise
external abort" on reboot with ohci-platform loaded when PM runtime
is implemented for the SoC.

Let's fix this by adding PM runtime support to usb_hcd_platform_shutdown.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/usb/core/hcd.c

index 015b126ce4555e8d58b8744e7666c384387e9ddf..a5c8bcb7723b4d754748bfb330bcc642e7efe6cc 100644 (file)
@@ -3001,6 +3001,9 @@ usb_hcd_platform_shutdown(struct platform_device *dev)
 {
        struct usb_hcd *hcd = platform_get_drvdata(dev);
 
+       /* No need for pm_runtime_put(), we're shutting down */
+       pm_runtime_get_sync(&dev->dev);
+
        if (hcd->driver->shutdown)
                hcd->driver->shutdown(hcd);
 }