* [PATCH 3/4] usb: host: xhci-dbg: HCIVERSION should be a binary number
[not found] <1489066777-12597-1-git-send-email-mathias.nyman@linux.intel.com>
@ 2017-03-09 13:39 ` Mathias Nyman
2017-03-09 13:39 ` [PATCH 4/4] usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers Mathias Nyman
1 sibling, 0 replies; 2+ messages in thread
From: Mathias Nyman @ 2017-03-09 13:39 UTC (permalink / raw)
To: gregkh; +Cc: linux-usb, Peter Chen, Lu Baolu, stable, Mathias Nyman
From: Peter Chen <peter.chen@nxp.com>
According to xHCI spec, HCIVERSION containing a BCD encoding
of the xHCI specification revision number, 0100h corresponds
to xHCI version 1.0. Change "100" as "0x100".
Cc: Lu Baolu <baolu.lu@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Fixes: 04abb6de2825 ("xhci: Read and parse new xhci
1.1 capability register")
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
drivers/usb/host/xhci-dbg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 363d125..2b4a00f 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -109,7 +109,7 @@ static void xhci_print_cap_regs(struct xhci_hcd *xhci)
xhci_dbg(xhci, "RTSOFF 0x%x:\n", temp & RTSOFF_MASK);
/* xhci 1.1 controllers have the HCCPARAMS2 register */
- if (hci_version > 100) {
+ if (hci_version > 0x100) {
temp = readl(&xhci->cap_regs->hcc_params2);
xhci_dbg(xhci, "HCC PARAMS2 0x%x:\n", (unsigned int) temp);
xhci_dbg(xhci, " HC %s Force save context capability",
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 4/4] usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers
[not found] <1489066777-12597-1-git-send-email-mathias.nyman@linux.intel.com>
2017-03-09 13:39 ` [PATCH 3/4] usb: host: xhci-dbg: HCIVERSION should be a binary number Mathias Nyman
@ 2017-03-09 13:39 ` Mathias Nyman
1 sibling, 0 replies; 2+ messages in thread
From: Mathias Nyman @ 2017-03-09 13:39 UTC (permalink / raw)
To: gregkh; +Cc: linux-usb, Guenter Roeck, stable, Mathias Nyman
From: Guenter Roeck <linux@roeck-us.net>
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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
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 6d33b42..bd02a6c 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);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-09 13:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1489066777-12597-1-git-send-email-mathias.nyman@linux.intel.com>
2017-03-09 13:39 ` [PATCH 3/4] usb: host: xhci-dbg: HCIVERSION should be a binary number Mathias Nyman
2017-03-09 13:39 ` [PATCH 4/4] usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers 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).