]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Dec 2022 15:23:07 +0000 (16:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Dec 2022 15:23:07 +0000 (16:23 +0100)
added patches:
igb-initialize-mailbox-message-for-vf-reset.patch
usb-ulpi-defer-ulpi_register-on-ulpi_read_id-timeout.patch
xhci-apply-xhci_reset_to_default-quirk-to-adl-n.patch

queue-5.10/igb-initialize-mailbox-message-for-vf-reset.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/usb-ulpi-defer-ulpi_register-on-ulpi_read_id-timeout.patch [new file with mode: 0644]
queue-5.10/xhci-apply-xhci_reset_to_default-quirk-to-adl-n.patch [new file with mode: 0644]

diff --git a/queue-5.10/igb-initialize-mailbox-message-for-vf-reset.patch b/queue-5.10/igb-initialize-mailbox-message-for-vf-reset.patch
new file mode 100644 (file)
index 0000000..98fd54a
--- /dev/null
@@ -0,0 +1,38 @@
+From de5dc44370fbd6b46bd7f1a1e00369be54a041c8 Mon Sep 17 00:00:00 2001
+From: Tony Nguyen <anthony.l.nguyen@intel.com>
+Date: Mon, 12 Dec 2022 11:00:31 -0800
+Subject: igb: Initialize mailbox message for VF reset
+
+From: Tony Nguyen <anthony.l.nguyen@intel.com>
+
+commit de5dc44370fbd6b46bd7f1a1e00369be54a041c8 upstream.
+
+When a MAC address is not assigned to the VF, that portion of the message
+sent to the VF is not set. The memory, however, is allocated from the
+stack meaning that information may be leaked to the VM. Initialize the
+message buffer to 0 so that no information is passed to the VM in this
+case.
+
+Fixes: 6ddbc4cf1f4d ("igb: Indicate failure on vf reset for empty mac address")
+Reported-by: Akihiko Odaki <akihiko.odaki@daynix.com>
+Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
+Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
+Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
+Link: https://lore.kernel.org/r/20221212190031.3983342-1-anthony.l.nguyen@intel.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/intel/igb/igb_main.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/intel/igb/igb_main.c
++++ b/drivers/net/ethernet/intel/igb/igb_main.c
+@@ -7416,7 +7416,7 @@ static void igb_vf_reset_msg(struct igb_
+ {
+       struct e1000_hw *hw = &adapter->hw;
+       unsigned char *vf_mac = adapter->vf_data[vf].vf_mac_addresses;
+-      u32 reg, msgbuf[3];
++      u32 reg, msgbuf[3] = {};
+       u8 *addr = (u8 *)(&msgbuf[1]);
+       /* process all the same items cleared in a function level reset */
index 15dfb79a8dc78821ac7ccf40594c86051ebd9d17..4d0adcbfa3c1408547381684cf101d91b681017f 100644 (file)
@@ -7,3 +7,6 @@ usb-serial-option-add-quectel-em05-g-modem.patch
 usb-serial-cp210x-add-kamstrup-rf-sniffer-pids.patch
 usb-serial-f81232-fix-division-by-zero-on-line-speed-change.patch
 usb-serial-f81534-fix-division-by-zero-on-line-speed-change.patch
+xhci-apply-xhci_reset_to_default-quirk-to-adl-n.patch
+igb-initialize-mailbox-message-for-vf-reset.patch
+usb-ulpi-defer-ulpi_register-on-ulpi_read_id-timeout.patch
diff --git a/queue-5.10/usb-ulpi-defer-ulpi_register-on-ulpi_read_id-timeout.patch b/queue-5.10/usb-ulpi-defer-ulpi_register-on-ulpi_read_id-timeout.patch
new file mode 100644 (file)
index 0000000..72401eb
--- /dev/null
@@ -0,0 +1,43 @@
+From 8a7b31d545d3a15f0e6f5984ae16f0ca4fd76aac Mon Sep 17 00:00:00 2001
+From: Ferry Toth <ftoth@exalondelft.nl>
+Date: Mon, 5 Dec 2022 21:15:26 +0100
+Subject: usb: ulpi: defer ulpi_register on ulpi_read_id timeout
+
+From: Ferry Toth <ftoth@exalondelft.nl>
+
+commit 8a7b31d545d3a15f0e6f5984ae16f0ca4fd76aac upstream.
+
+Since commit 0f0101719138 ("usb: dwc3: Don't switch OTG -> peripheral
+if extcon is present") Dual Role support on Intel Merrifield platform
+broke due to rearranging the call to dwc3_get_extcon().
+
+It appears to be caused by ulpi_read_id() on the first test write failing
+with -ETIMEDOUT. Currently ulpi_read_id() expects to discover the phy via
+DT when the test write fails and returns 0 in that case, even if DT does not
+provide the phy. As a result usb probe completes without phy.
+
+Make ulpi_read_id() return -ETIMEDOUT to its user if the first test write
+fails. The user should then handle it appropriately. A follow up patch
+will make dwc3_core_init() set -EPROBE_DEFER in this case and bail out.
+
+Fixes: ef6a7bcfb01c ("usb: ulpi: Support device discovery via DT")
+Cc: stable@vger.kernel.org
+Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
+Link: https://lore.kernel.org/r/20221205201527.13525-2-ftoth@exalondelft.nl
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/common/ulpi.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/common/ulpi.c
++++ b/drivers/usb/common/ulpi.c
+@@ -208,7 +208,7 @@ static int ulpi_read_id(struct ulpi *ulp
+       /* Test the interface */
+       ret = ulpi_write(ulpi, ULPI_SCRATCH, 0xaa);
+       if (ret < 0)
+-              goto err;
++              return ret;
+       ret = ulpi_read(ulpi, ULPI_SCRATCH);
+       if (ret < 0)
diff --git a/queue-5.10/xhci-apply-xhci_reset_to_default-quirk-to-adl-n.patch b/queue-5.10/xhci-apply-xhci_reset_to_default-quirk-to-adl-n.patch
new file mode 100644 (file)
index 0000000..9771915
--- /dev/null
@@ -0,0 +1,48 @@
+From fed70b61ef2c0aed54456db3d485b215f6cc3209 Mon Sep 17 00:00:00 2001
+From: Reka Norman <rekanorman@chromium.org>
+Date: Wed, 30 Nov 2022 11:19:40 +0200
+Subject: xhci: Apply XHCI_RESET_TO_DEFAULT quirk to ADL-N
+
+From: Reka Norman <rekanorman@chromium.org>
+
+commit fed70b61ef2c0aed54456db3d485b215f6cc3209 upstream.
+
+ADL-N systems have the same issue as ADL-P, where a large boot firmware
+delay is seen if USB ports are left in U3 at shutdown. So apply the
+XHCI_RESET_TO_DEFAULT quirk to ADL-N as well.
+
+This patch depends on commit 34cd2db408d5 ("xhci: Add quirk to reset
+host back to default state at shutdown").
+
+The issue it fixes is a ~20s boot time delay when booting from S5. It
+affects ADL-N devices, and ADL-N support was added starting from v5.16.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Reka Norman <rekanorman@chromium.org>
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Link: https://lore.kernel.org/r/20221130091944.2171610-3-mathias.nyman@linux.intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/xhci-pci.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -59,6 +59,7 @@
+ #define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI           0x9a13
+ #define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI          0x1138
+ #define PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI               0x51ed
++#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_PCH_XHCI     0x54ed
+ #define PCI_DEVICE_ID_AMD_PROMONTORYA_4                       0x43b9
+ #define PCI_DEVICE_ID_AMD_PROMONTORYA_3                       0x43ba
+@@ -242,7 +243,8 @@ static void xhci_pci_quirks(struct devic
+               xhci->quirks |= XHCI_MISSING_CAS;
+       if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
+-          pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI)
++          (pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI ||
++           pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_PCH_XHCI))
+               xhci->quirks |= XHCI_RESET_TO_DEFAULT;
+       if (pdev->vendor == PCI_VENDOR_ID_INTEL &&