diff options
author | Guenter Roeck <linux@roeck-us.net> | 2017-03-09 08:39:37 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-18 07:14:32 -0400 |
commit | 24db1c5a1c52c74b0218847c0a4cb1b40678cf84 (patch) | |
tree | 4eac64a4f1c391d1763cbbb2d81488e6f3beeb48 /drivers/usb | |
parent | d863767907527f0d43ea856a78c060d1f3599ac9 (diff) |
usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers
commit dcc7620cad5ad1326a78f4031a7bf4f0e5b42984 upstream.
Upstream commit 98d74f9ceaef ("xhci: fix 10 second timeout on removal of
PCI hotpluggable xhci controllers") fixes a problem with hot pluggable PCI
xhci controllers which can result in excessive timeouts, to the point where
the system reports a deadlock.
The same problem is seen with hot pluggable xhci controllers using the
xhci-plat driver, such as the driver used for Type-C ports on rk3399.
Similar to hot-pluggable PCI controllers, the driver for this chip
removes the xhci controller from the system when the Type-C cable is
disconnected.
The solution for PCI devices works just as well for non-PCI devices
and avoids the problem.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/xhci-plat.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index abe360684f0b..5895e84f9dcc 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c | |||
@@ -274,6 +274,8 @@ static int xhci_plat_remove(struct platform_device *dev) | |||
274 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); | 274 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
275 | struct clk *clk = xhci->clk; | 275 | struct clk *clk = xhci->clk; |
276 | 276 | ||
277 | xhci->xhc_state |= XHCI_STATE_REMOVING; | ||
278 | |||
277 | usb_remove_hcd(xhci->shared_hcd); | 279 | usb_remove_hcd(xhci->shared_hcd); |
278 | usb_phy_shutdown(hcd->usb_phy); | 280 | usb_phy_shutdown(hcd->usb_phy); |
279 | 281 | ||