]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.13.6/revert-xhci-limit-usb2-port-wake-support-for-amd-promontory-hosts.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.13.6 / revert-xhci-limit-usb2-port-wake-support-for-amd-promontory-hosts.patch
CommitLineData
b0bd2087
GKH
1From bcd6a7aa13800afc1418e6b29d944d882214939a Mon Sep 17 00:00:00 2001
2From: Kai-Heng Feng <kai.heng.feng@canonical.com>
3Date: Mon, 18 Sep 2017 17:39:19 +0300
4Subject: Revert "xhci: Limit USB2 port wake support for AMD Promontory hosts"
5
6From: Kai-Heng Feng <kai.heng.feng@canonical.com>
7
8commit bcd6a7aa13800afc1418e6b29d944d882214939a upstream.
9
10This reverts commit dec08194ffeccfa1cf085906b53d301930eae18f.
11
12Commit dec08194ffec ("xhci: Limit USB2 port wake support for AMD Promontory
13hosts") makes all high speed USB ports on ASUS PRIME B350M-A cease to
14function after enabling runtime PM.
15
16All boards with this chipsets will be affected, so revert the commit.
17
18The original patch was added to stable 4.9, 4.11 and 4.12 and needs
19to reverted from there as well
20
21Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
22Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24
25---
26 drivers/usb/host/xhci-hub.c | 3 ---
27 drivers/usb/host/xhci-pci.c | 12 ------------
28 drivers/usb/host/xhci.h | 2 +-
29 3 files changed, 1 insertion(+), 16 deletions(-)
30
31--- a/drivers/usb/host/xhci-hub.c
32+++ b/drivers/usb/host/xhci-hub.c
33@@ -1482,9 +1482,6 @@ int xhci_bus_suspend(struct usb_hcd *hcd
34 t2 |= PORT_WKOC_E | PORT_WKCONN_E;
35 t2 &= ~PORT_WKDISC_E;
36 }
37- if ((xhci->quirks & XHCI_U2_DISABLE_WAKE) &&
38- (hcd->speed < HCD_USB3))
39- t2 &= ~PORT_WAKE_BITS;
40 } else
41 t2 &= ~PORT_WAKE_BITS;
42
43--- a/drivers/usb/host/xhci-pci.c
44+++ b/drivers/usb/host/xhci-pci.c
45@@ -54,11 +54,6 @@
46 #define PCI_DEVICE_ID_INTEL_APL_XHCI 0x5aa8
47 #define PCI_DEVICE_ID_INTEL_DNV_XHCI 0x19d0
48
49-#define PCI_DEVICE_ID_AMD_PROMONTORYA_4 0x43b9
50-#define PCI_DEVICE_ID_AMD_PROMONTORYA_3 0x43ba
51-#define PCI_DEVICE_ID_AMD_PROMONTORYA_2 0x43bb
52-#define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc
53-
54 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
55
56 static const char hcd_name[] = "xhci_hcd";
57@@ -142,13 +137,6 @@ static void xhci_pci_quirks(struct devic
58 if (pdev->vendor == PCI_VENDOR_ID_AMD)
59 xhci->quirks |= XHCI_TRUST_TX_LENGTH;
60
61- if ((pdev->vendor == PCI_VENDOR_ID_AMD) &&
62- ((pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4) ||
63- (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_3) ||
64- (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_2) ||
65- (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_1)))
66- xhci->quirks |= XHCI_U2_DISABLE_WAKE;
67-
68 if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
69 xhci->quirks |= XHCI_LPM_SUPPORT;
70 xhci->quirks |= XHCI_INTEL_HOST;
71--- a/drivers/usb/host/xhci.h
72+++ b/drivers/usb/host/xhci.h
73@@ -1821,7 +1821,7 @@ struct xhci_hcd {
74 /* For controller with a broken Port Disable implementation */
75 #define XHCI_BROKEN_PORT_PED (1 << 25)
76 #define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26)
77-#define XHCI_U2_DISABLE_WAKE (1 << 27)
78+/* Reserved. It was XHCI_U2_DISABLE_WAKE */
79 #define XHCI_ASMEDIA_MODIFY_FLOWCONTROL (1 << 28)
80
81 unsigned int num_active_eps;