blob: 952b977ff6aa84987f59babf477450e728f5687b [file] [log] [blame]
Klaus Heinrich Kiwi7aa26cd2020-09-24 12:18:00 -05001From eb9ba66045e92706878d619e0b8c94669cc993f9 Mon Sep 17 00:00:00 2001
2From: Brian King <brking@linux.vnet.ibm.com>
3Date: Wed, 25 Oct 2017 10:42:59 +1100
4Subject: [PATCH 1/2] xhci: Reset controller on xhci shutdown
5
6Fixes kexec boot. Without a hard reset, some USB chips will fail to
7initialize in a kexec booted kernel.
8
9Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
10Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
11Signed-off-by: Joel Stanley <joel@jms.id.au>
12---
13 drivers/usb/host/xhci.c | 3 +++
14 1 file changed, 3 insertions(+)
15
16diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
17index ed468ee..e881cde 100644
18--- a/drivers/usb/host/xhci.c
19+++ b/drivers/usb/host/xhci.c
20@@ -789,6 +789,9 @@ void xhci_shutdown(struct usb_hcd *hcd)
21 xhci_dbg_trace(xhci, trace_xhci_dbg_init,
22 "xhci_shutdown completed - status = %x",
23 readl(&xhci->op_regs->status));
24+
25+ /* TI XHCI controllers do not come back after kexec without this hack */
26+ pci_reset_function_locked(to_pci_dev(hcd->self.sysdev));
27 }
28 EXPORT_SYMBOL_GPL(xhci_shutdown);
29
30--
311.9.4
32