* [PATCH] usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers
@ 2017-03-08 19:49 Guenter Roeck
2017-03-09 8:47 ` Mathias Nyman
0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2017-03-08 19:49 UTC (permalink / raw)
To: Mathias Nyman; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, Guenter Roeck
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>
---
drivers/usb/host/xhci-plat.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 6d33b42ffcf5..bd02a6cd8e2c 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -286,6 +286,8 @@ static int xhci_plat_remove(struct platform_device *dev)
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
struct clk *clk = xhci->clk;
+ xhci->xhc_state |= XHCI_STATE_REMOVING;
+
usb_remove_hcd(xhci->shared_hcd);
usb_phy_shutdown(hcd->usb_phy);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers
2017-03-08 19:49 [PATCH] usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers Guenter Roeck
@ 2017-03-09 8:47 ` Mathias Nyman
0 siblings, 0 replies; 2+ messages in thread
From: Mathias Nyman @ 2017-03-09 8:47 UTC (permalink / raw)
To: Guenter Roeck, Mathias Nyman; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel
On 08.03.2017 21:49, Guenter Roeck wrote:
> 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>
> ---
Thanks, adding to queue
-Mathias
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-09 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 19:49 [PATCH] usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers Guenter Roeck
2017-03-09 8:47 ` Mathias Nyman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).