blob: 3675f536a46039508f5732875f3bce7a9c0c90c4 [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 Stanley6453c892018-03-29 17:37:51 +11004Subject: [PATCH 1/4] 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---
13 drivers/usb/host/xhci.c | 1 +
14 1 file changed, 1 insertion(+)
15
16diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
Joel Stanley6453c892018-03-29 17:37:51 +110017index a7c99e121cc6..f953c94b2c5e 100644
Samuel Mendoza-Jonas69b3de02017-10-25 13:20:17 +110018--- a/drivers/usb/host/xhci.c
19+++ b/drivers/usb/host/xhci.c
Joel Stanleya8648732018-02-05 14:12:27 +103020@@ -722,6 +722,7 @@ static void xhci_shutdown(struct usb_hcd *hcd)
Samuel Mendoza-Jonas69b3de02017-10-25 13:20:17 +110021 /* Yet another workaround for spurious wakeups at shutdown with HSW */
22 if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
23 pci_set_power_state(to_pci_dev(hcd->self.sysdev), PCI_D3hot);
24+ pci_reset_function_locked(to_pci_dev(hcd->self.sysdev));
25 }
26
27 #ifdef CONFIG_PM