Skip to content

Commit

Permalink
usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci co…
Browse files Browse the repository at this point in the history
…ntrollers

Upstream commit 98d74f9 ("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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Guenter Roeck authored and Greg Kroah-Hartman committed Mar 9, 2017
1 parent f95e60a commit dcc7620
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/host/xhci-plat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit dcc7620

Please sign in to comment.