]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.4/usb-core-add-pm-runtime-calls-to-usb_hcd_platform_sh.patch
da9c3777eef419cefdf93fccfd80437efa64c217
[thirdparty/kernel/stable-queue.git] / queue-4.4 / usb-core-add-pm-runtime-calls-to-usb_hcd_platform_sh.patch
1 From d880d712872ce346685c8199a47ddcbdcb29eb6d Mon Sep 17 00:00:00 2001
2 From: Tony Lindgren <tony@atomide.com>
3 Date: Fri, 22 Mar 2019 14:54:05 -0700
4 Subject: usb: core: Add PM runtime calls to usb_hcd_platform_shutdown
5
6 [ Upstream commit 8ead7e817224d7832fe51a19783cb8fcadc79467 ]
7
8 If ohci-platform is runtime suspended, we can currently get an "imprecise
9 external abort" on reboot with ohci-platform loaded when PM runtime
10 is implemented for the SoC.
11
12 Let's fix this by adding PM runtime support to usb_hcd_platform_shutdown.
13
14 Signed-off-by: Tony Lindgren <tony@atomide.com>
15 Acked-by: Alan Stern <stern@rowland.harvard.edu>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17 Signed-off-by: Sasha Levin <sashal@kernel.org>
18 ---
19 drivers/usb/core/hcd.c | 3 +++
20 1 file changed, 3 insertions(+)
21
22 diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
23 index 9c4f9b6e57e29..99c146f4b6b51 100644
24 --- a/drivers/usb/core/hcd.c
25 +++ b/drivers/usb/core/hcd.c
26 @@ -3007,6 +3007,9 @@ usb_hcd_platform_shutdown(struct platform_device *dev)
27 {
28 struct usb_hcd *hcd = platform_get_drvdata(dev);
29
30 + /* No need for pm_runtime_put(), we're shutting down */
31 + pm_runtime_get_sync(&dev->dev);
32 +
33 if (hcd->driver->shutdown)
34 hcd->driver->shutdown(hcd);
35 }
36 --
37 2.20.1
38