Samuel Mendoza-Jonas | 69b3de0 | 2017-10-25 13:20:17 +1100 | [diff] [blame] | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | From: Brian King <brking@linux.vnet.ibm.com> |
| 3 | Date: Wed, 25 Oct 2017 10:42:59 +1100 |
Joel Stanley | 86845e3 | 2021-07-15 22:27:34 +0930 | [diff] [blame] | 4 | Subject: [PATCH 1/2] xhci: Reset controller on xhci shutdown |
Samuel Mendoza-Jonas | 69b3de0 | 2017-10-25 13:20:17 +1100 | [diff] [blame] | 5 | |
| 6 | Fixes kexec boot. Without a hard reset, some USB chips will fail to |
| 7 | initialize in a kexec booted kernel. |
| 8 | |
| 9 | Signed-off-by: Brian King <brking@linux.vnet.ibm.com> |
| 10 | Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> |
Joel Stanley | 8a681bf | 2017-11-03 13:59:32 +1100 | [diff] [blame] | 11 | Signed-off-by: Joel Stanley <joel@jms.id.au> |
Samuel Mendoza-Jonas | 69b3de0 | 2017-10-25 13:20:17 +1100 | [diff] [blame] | 12 | --- |
Joel Stanley | 350020f | 2020-01-02 17:54:21 +1100 | [diff] [blame] | 13 | drivers/usb/host/xhci.c | 3 +++ |
| 14 | 1 file changed, 3 insertions(+) |
Samuel Mendoza-Jonas | 69b3de0 | 2017-10-25 13:20:17 +1100 | [diff] [blame] | 15 | |
| 16 | diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c |
Joel Stanley | 86845e3 | 2021-07-15 22:27:34 +0930 | [diff] [blame] | 17 | index a8d97e23f601..308ab396bd88 100644 |
Samuel Mendoza-Jonas | 69b3de0 | 2017-10-25 13:20:17 +1100 | [diff] [blame] | 18 | --- a/drivers/usb/host/xhci.c |
| 19 | +++ b/drivers/usb/host/xhci.c |
Joel Stanley | 2070d28 | 2021-07-15 17:27:03 +0930 | [diff] [blame] | 20 | @@ -793,6 +793,9 @@ void xhci_shutdown(struct usb_hcd *hcd) |
Joel Stanley | 350020f | 2020-01-02 17:54:21 +1100 | [diff] [blame] | 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-Jonas | 69b3de0 | 2017-10-25 13:20:17 +1100 | [diff] [blame] | 26 | + pci_reset_function_locked(to_pci_dev(hcd->self.sysdev)); |
| 27 | } |
Joel Stanley | 350020f | 2020-01-02 17:54:21 +1100 | [diff] [blame] | 28 | EXPORT_SYMBOL_GPL(xhci_shutdown); |
Samuel Mendoza-Jonas | 69b3de0 | 2017-10-25 13:20:17 +1100 | [diff] [blame] | 29 | |