blob: 64fc38b17e1133bf87461e5ec802d68eced7bd88 [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 Stanley8a681bf2017-11-03 13:59:32 +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 Stanley8a681bf2017-11-03 13:59:32 +110017index 51535ba2bcd4..42341203c7d9 100644
Samuel Mendoza-Jonas69b3de02017-10-25 13:20:17 +110018--- a/drivers/usb/host/xhci.c
19+++ b/drivers/usb/host/xhci.c
20@@ -729,6 +729,7 @@ static void xhci_shutdown(struct usb_hcd *hcd)
21 /* 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