blob: 197210fbce7f2ddbbb974d8301ef4bb85b7328a7 [file] [log] [blame]
Samuel Mendoza-Jonas69b3de02017-10-25 13:20:17 +11001From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Brian King <brking@linux.vnet.ibm.com>
3Date: Wed, 25 Oct 2017 10:42:59 +1100
Joel Stanleyd7fd58d2019-10-23 12:30:37 +11004Subject: [PATCH 1/8] xhci: Reset controller on xhci shutdown
Samuel Mendoza-Jonas69b3de02017-10-25 13:20:17 +11005
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>
Joel Stanley8a681bf2017-11-03 13:59:32 +110011Signed-off-by: Joel Stanley <joel@jms.id.au>
Samuel Mendoza-Jonas69b3de02017-10-25 13:20:17 +110012---
Joel Stanley350020f2020-01-02 17:54:21 +110013 drivers/usb/host/xhci.c | 3 +++
14 1 file changed, 3 insertions(+)
Samuel Mendoza-Jonas69b3de02017-10-25 13:20:17 +110015
16diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
Joel Stanley350020f2020-01-02 17:54:21 +110017index 73ad81eb2a8e..b9a6a80317ea 100644
Samuel Mendoza-Jonas69b3de02017-10-25 13:20:17 +110018--- a/drivers/usb/host/xhci.c
19+++ b/drivers/usb/host/xhci.c
Joel Stanley350020f2020-01-02 17:54:21 +110020@@ -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 */
Samuel Mendoza-Jonas69b3de02017-10-25 13:20:17 +110026+ pci_reset_function_locked(to_pci_dev(hcd->self.sysdev));
27 }
Joel Stanley350020f2020-01-02 17:54:21 +110028 EXPORT_SYMBOL_GPL(xhci_shutdown);
Samuel Mendoza-Jonas69b3de02017-10-25 13:20:17 +110029