From: Tony Lindgren Date: Fri, 22 Mar 2019 21:54:05 +0000 (-0700) Subject: usb: core: Add PM runtime calls to usb_hcd_platform_shutdown X-Git-Tag: Ubuntu-5.0.0-26.27~137 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=87ee4d81f73669d0a6446647ead70ddab02c3c55;p=mirror_ubuntu-disco-kernel.git usb: core: Add PM runtime calls to usb_hcd_platform_shutdown 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 Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Signed-off-by: Khalid Elmously Signed-off-by: Stefan Bader --- diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 015b126ce455..a5c8bcb7723b 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -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); }