Skip to contentSkip to conversation

patch "usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci" added to usb-linus

PATCH [email protected] 1 participant 1 message Mar 9, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From dcc7620cad5ad1326a78f4031a7bf4f0e5b42984 Mon Sep 17 00:00:00 2001

From: Guenter Roeck <[email protected]>
Date: Thu, 9 Mar 2017 15:39:37 +0200
Subject: usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci
controllers

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.

---
 drivers/usb/host/xhci-plat.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-plat.c +2 -0
index 6d33b42ffcf5..bd02a6cd8e2c 100644
@@ -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);
 
Signature · 1 line
2.12.0