summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci.h
diff options
context:
space:
mode:
authorWu Liang feng <wulf@rock-chips.com>2014-12-24 18:22:19 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-09 12:25:54 -0800
commit314b41b16a71ee824f55e2791fcb92997672da37 (patch)
treea9df21d88f343ee33f85b093a535fcb8780ebe98 /drivers/usb/host/ehci.h
parent96e418543d27212d73f2fec76490f833baa27e3b (diff)
downloadlinux-stable-314b41b16a71ee824f55e2791fcb92997672da37.tar.gz
linux-stable-314b41b16a71ee824f55e2791fcb92997672da37.tar.bz2
linux-stable-314b41b16a71ee824f55e2791fcb92997672da37.zip
USB: ehci-platform: Support ehci reset after resume quirk
The Rockchip rk3288 EHCI controller doesn't properly detect the case when a device is removed during suspend. Specifically, when usb resume from suspend, the EHCI controller maintaining the USB state (FLAG_CF is 1, Current Connect Status is 1), but a USB device (like a USB camera on rk3288) may have been disconnected actually. Let's add a quirk to force ehci to go into the usb_root_hub_lost_power() path and reset after resume. This should generally reset the whole controller and all ports and initialize everything cleanly again, and bring the devices back up. As part of this, rename the "hibernation" paramter of ehci_resume() to force_reset since hibernation is simply another case where we can't trust the autodetected status and need to force a reset of devices. Signed-off-by: Wu Liang feng <wulf@rock-chips.com> Reviewed-by: Julius Werner <jwerner@google.com> Reviewed-by: Doug Anderson <dianders@google.com> Reviewed-by: Tomasz Figa <tfiga@google.com> Reviewed-by: Pawel Osciak <posciak@google.com> Reviewed-by: Sonny Rao <sonnyrao@google.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Doug Anderson <dianders@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci.h')
-rw-r--r--drivers/usb/host/ehci.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 6f0577b0a5ae..52ef0844a180 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -871,7 +871,7 @@ extern int ehci_handshake(struct ehci_hcd *ehci, void __iomem *ptr,
#ifdef CONFIG_PM
extern int ehci_suspend(struct usb_hcd *hcd, bool do_wakeup);
-extern int ehci_resume(struct usb_hcd *hcd, bool hibernated);
+extern int ehci_resume(struct usb_hcd *hcd, bool force_reset);
#endif /* CONFIG_PM */
extern int ehci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,