]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Nov 2021 16:26:46 +0000 (17:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Nov 2021 16:26:46 +0000 (17:26 +0100)
added patches:
usb-xhci-enable-runtime-pm-by-default-on-amd-yellow-carp-platform.patch
xhci-fix-usb-3.1-enumeration-issues-by-increasing-roothub-power-on-good-delay.patch

queue-5.15/series [new file with mode: 0644]
queue-5.15/usb-xhci-enable-runtime-pm-by-default-on-amd-yellow-carp-platform.patch [new file with mode: 0644]
queue-5.15/xhci-fix-usb-3.1-enumeration-issues-by-increasing-roothub-power-on-good-delay.patch [new file with mode: 0644]

diff --git a/queue-5.15/series b/queue-5.15/series
new file mode 100644 (file)
index 0000000..ab7138b
--- /dev/null
@@ -0,0 +1,2 @@
+xhci-fix-usb-3.1-enumeration-issues-by-increasing-roothub-power-on-good-delay.patch
+usb-xhci-enable-runtime-pm-by-default-on-amd-yellow-carp-platform.patch
diff --git a/queue-5.15/usb-xhci-enable-runtime-pm-by-default-on-amd-yellow-carp-platform.patch b/queue-5.15/usb-xhci-enable-runtime-pm-by-default-on-amd-yellow-carp-platform.patch
new file mode 100644 (file)
index 0000000..92d8f75
--- /dev/null
@@ -0,0 +1,58 @@
+From 660a92a59b9e831a0407e41ff62875656d30006e Mon Sep 17 00:00:00 2001
+From: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>
+Date: Thu, 14 Oct 2021 15:12:00 +0300
+Subject: usb: xhci: Enable runtime-pm by default on AMD Yellow Carp platform
+
+From: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>
+
+commit 660a92a59b9e831a0407e41ff62875656d30006e upstream.
+
+AMD's Yellow Carp platform supports runtime power management for
+XHCI Controllers, so enable the same by default for all XHCI Controllers.
+
+[ regrouped and aligned the PCI_DEVICE_ID definitions -Mathias]
+
+Cc: stable <stable@vger.kernel.org>
+Reviewed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
+Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
+Reviewed-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
+Signed-off-by: Nehal Bakulchandra Shah <Nehal-Bakulchandra.shah@amd.com>
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Link: https://lore.kernel.org/r/20211014121200.75433-2-mathias.nyman@linux.intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/xhci-pci.c |   16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -65,6 +65,13 @@
+ #define PCI_DEVICE_ID_AMD_PROMONTORYA_3                       0x43ba
+ #define PCI_DEVICE_ID_AMD_PROMONTORYA_2                       0x43bb
+ #define PCI_DEVICE_ID_AMD_PROMONTORYA_1                       0x43bc
++#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1          0x161a
++#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2          0x161b
++#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3          0x161d
++#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4          0x161e
++#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5          0x15d6
++#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6          0x15d7
++
+ #define PCI_DEVICE_ID_ASMEDIA_1042_XHCI                       0x1042
+ #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI              0x1142
+ #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI                       0x1242
+@@ -317,6 +324,15 @@ static void xhci_pci_quirks(struct devic
+            pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4))
+               xhci->quirks |= XHCI_NO_SOFT_RETRY;
++      if (pdev->vendor == PCI_VENDOR_ID_AMD &&
++          (pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1 ||
++          pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2 ||
++          pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3 ||
++          pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4 ||
++          pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5 ||
++          pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6))
++              xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
++
+       if (xhci->quirks & XHCI_RESET_ON_RESUME)
+               xhci_dbg_trace(xhci, trace_xhci_dbg_quirks,
+                               "QUIRK: Resetting on resume");
diff --git a/queue-5.15/xhci-fix-usb-3.1-enumeration-issues-by-increasing-roothub-power-on-good-delay.patch b/queue-5.15/xhci-fix-usb-3.1-enumeration-issues-by-increasing-roothub-power-on-good-delay.patch
new file mode 100644 (file)
index 0000000..bb2f965
--- /dev/null
@@ -0,0 +1,58 @@
+From e1959faf085b004e6c3afaaaa743381f00e7c015 Mon Sep 17 00:00:00 2001
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+Date: Fri, 5 Nov 2021 18:00:36 +0200
+Subject: xhci: Fix USB 3.1 enumeration issues by increasing roothub power-on-good delay
+
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+
+commit e1959faf085b004e6c3afaaaa743381f00e7c015 upstream.
+
+Some USB 3.1 enumeration issues were reported after the hub driver removed
+the minimum 100ms limit for the power-on-good delay.
+
+Since commit 90d28fb53d4a ("usb: core: reduce power-on-good delay time of
+root hub") the hub driver sets the power-on-delay based on the
+bPwrOn2PwrGood value in the hub descriptor.
+
+xhci driver has a 20ms bPwrOn2PwrGood value for both roothubs based
+on xhci spec section 5.4.8, but it's clearly not enough for the
+USB 3.1 devices, causing enumeration issues.
+
+Tests indicate full 100ms delay is needed.
+
+Reported-by: Walt Jr. Brake <mr.yming81@gmail.com>
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Fixes: 90d28fb53d4a ("usb: core: reduce power-on-good delay time of root hub")
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20211105160036.549516-1-mathias.nyman@linux.intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/xhci-hub.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/xhci-hub.c
++++ b/drivers/usb/host/xhci-hub.c
+@@ -257,7 +257,6 @@ static void xhci_common_hub_descriptor(s
+ {
+       u16 temp;
+-      desc->bPwrOn2PwrGood = 10;      /* xhci section 5.4.9 says 20ms max */
+       desc->bHubContrCurrent = 0;
+       desc->bNbrPorts = ports;
+@@ -292,6 +291,7 @@ static void xhci_usb2_hub_descriptor(str
+       desc->bDescriptorType = USB_DT_HUB;
+       temp = 1 + (ports / 8);
+       desc->bDescLength = USB_DT_HUB_NONVAR_SIZE + 2 * temp;
++      desc->bPwrOn2PwrGood = 10;      /* xhci section 5.4.8 says 20ms */
+       /* The Device Removable bits are reported on a byte granularity.
+        * If the port doesn't exist within that byte, the bit is set to 0.
+@@ -344,6 +344,7 @@ static void xhci_usb3_hub_descriptor(str
+       xhci_common_hub_descriptor(xhci, desc, ports);
+       desc->bDescriptorType = USB_DT_SS_HUB;
+       desc->bDescLength = USB_DT_SS_HUB_SIZE;
++      desc->bPwrOn2PwrGood = 50;      /* usb 3.1 may fail if less than 100ms */
+       /* header decode latency should be zero for roothubs,
+        * see section 4.23.5.2.