]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 May 2024 13:09:26 +0000 (15:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 May 2024 13:09:26 +0000 (15:09 +0200)
added patches:
arm64-dts-qcom-fix-interrupt-map-parent-address-cells.patch
usb-typec-ucsi-check-for-notifications-after-init.patch
usb-typec-ucsi-fix-connector-check-on-init.patch

queue-5.15/arm64-dts-qcom-fix-interrupt-map-parent-address-cells.patch [new file with mode: 0644]
queue-5.15/series
queue-5.15/usb-typec-ucsi-check-for-notifications-after-init.patch [new file with mode: 0644]
queue-5.15/usb-typec-ucsi-fix-connector-check-on-init.patch [new file with mode: 0644]

diff --git a/queue-5.15/arm64-dts-qcom-fix-interrupt-map-parent-address-cells.patch b/queue-5.15/arm64-dts-qcom-fix-interrupt-map-parent-address-cells.patch
new file mode 100644 (file)
index 0000000..d98a1b6
--- /dev/null
@@ -0,0 +1,74 @@
+From 0ac10b291bee84b00bf9fb2afda444e77e7f88f4 Mon Sep 17 00:00:00 2001
+From: Rob Herring <robh@kernel.org>
+Date: Tue, 28 Sep 2021 14:22:09 -0500
+Subject: arm64: dts: qcom: Fix 'interrupt-map' parent address cells
+
+From: Rob Herring <robh@kernel.org>
+
+commit 0ac10b291bee84b00bf9fb2afda444e77e7f88f4 upstream.
+
+The 'interrupt-map' in several QCom SoCs is malformed. The '#address-cells'
+size of the parent interrupt controller (the GIC) is not accounted for.
+
+Cc: Andy Gross <agross@kernel.org>
+Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
+Cc: linux-arm-msm@vger.kernel.org
+Signed-off-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
+Link: https://lore.kernel.org/r/20210928192210.1842377-1-robh@kernel.org
+Cc: Alex Elder <elder@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/qcom/msm8998.dtsi |    8 ++++----
+ arch/arm64/boot/dts/qcom/sdm845.dtsi  |   16 ++++++++--------
+ 2 files changed, 12 insertions(+), 12 deletions(-)
+
+--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi
++++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi
+@@ -958,10 +958,10 @@
+                       interrupts = <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "msi";
+                       interrupt-map-mask = <0 0 0 0x7>;
+-                      interrupt-map = <0 0 0 1 &intc 0 135 IRQ_TYPE_LEVEL_HIGH>,
+-                                      <0 0 0 2 &intc 0 136 IRQ_TYPE_LEVEL_HIGH>,
+-                                      <0 0 0 3 &intc 0 138 IRQ_TYPE_LEVEL_HIGH>,
+-                                      <0 0 0 4 &intc 0 139 IRQ_TYPE_LEVEL_HIGH>;
++                      interrupt-map = <0 0 0 1 &intc 0 0 135 IRQ_TYPE_LEVEL_HIGH>,
++                                      <0 0 0 2 &intc 0 0 136 IRQ_TYPE_LEVEL_HIGH>,
++                                      <0 0 0 3 &intc 0 0 138 IRQ_TYPE_LEVEL_HIGH>,
++                                      <0 0 0 4 &intc 0 0 139 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&gcc GCC_PCIE_0_PIPE_CLK>,
+                                <&gcc GCC_PCIE_0_MSTR_AXI_CLK>,
+--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
++++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
+@@ -1996,10 +1996,10 @@
+                       interrupt-names = "msi";
+                       #interrupt-cells = <1>;
+                       interrupt-map-mask = <0 0 0 0x7>;
+-                      interrupt-map = <0 0 0 1 &intc 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
+-                                      <0 0 0 2 &intc 0 150 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
+-                                      <0 0 0 3 &intc 0 151 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
+-                                      <0 0 0 4 &intc 0 152 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
++                      interrupt-map = <0 0 0 1 &intc 0 0 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
++                                      <0 0 0 2 &intc 0 0 0 150 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
++                                      <0 0 0 3 &intc 0 0 0 151 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
++                                      <0 0 0 4 &intc 0 0 0 152 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
+                       clocks = <&gcc GCC_PCIE_0_PIPE_CLK>,
+                                <&gcc GCC_PCIE_0_AUX_CLK>,
+@@ -2101,10 +2101,10 @@
+                       interrupt-names = "msi";
+                       #interrupt-cells = <1>;
+                       interrupt-map-mask = <0 0 0 0x7>;
+-                      interrupt-map = <0 0 0 1 &intc 0 434 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
+-                                      <0 0 0 2 &intc 0 435 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
+-                                      <0 0 0 3 &intc 0 438 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
+-                                      <0 0 0 4 &intc 0 439 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
++                      interrupt-map = <0 0 0 1 &intc 0 0 0 434 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
++                                      <0 0 0 2 &intc 0 0 0 435 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
++                                      <0 0 0 3 &intc 0 0 0 438 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
++                                      <0 0 0 4 &intc 0 0 0 439 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
+                       clocks = <&gcc GCC_PCIE_1_PIPE_CLK>,
+                                <&gcc GCC_PCIE_1_AUX_CLK>,
index 457e01976d1c00c39a4c8d46322dbf49e9deb8cf..819c451667c0c38a6662fbdcda8cbd9d06bd8aa0 100644 (file)
@@ -143,3 +143,6 @@ acpi-cppc-fix-access-width-used-for-pcc-registers.patch
 btrfs-fix-kvcalloc-arguments-order-in-btrfs_ioctl_send.patch
 firewire-nosy-ensure-user_length-is-taken-into-account-when-fetching-packet-contents.patch
 reapply-drm-qxl-simplify-qxl_fence_wait.patch
+arm64-dts-qcom-fix-interrupt-map-parent-address-cells.patch
+usb-typec-ucsi-check-for-notifications-after-init.patch
+usb-typec-ucsi-fix-connector-check-on-init.patch
diff --git a/queue-5.15/usb-typec-ucsi-check-for-notifications-after-init.patch b/queue-5.15/usb-typec-ucsi-check-for-notifications-after-init.patch
new file mode 100644 (file)
index 0000000..25ca0ee
--- /dev/null
@@ -0,0 +1,64 @@
+From 808a8b9e0b87bbc72bcc1f7ddfe5d04746e7ce56 Mon Sep 17 00:00:00 2001
+From: "Christian A. Ehrhardt" <lk@c--e.de>
+Date: Wed, 20 Mar 2024 08:39:23 +0100
+Subject: usb: typec: ucsi: Check for notifications after init
+
+From: Christian A. Ehrhardt <lk@c--e.de>
+
+commit 808a8b9e0b87bbc72bcc1f7ddfe5d04746e7ce56 upstream.
+
+The completion notification for the final SET_NOTIFICATION_ENABLE
+command during initialization can include a connector change
+notification.  However, at the time this completion notification is
+processed, the ucsi struct is not ready to handle this notification.
+As a result the notification is ignored and the controller
+never sends an interrupt again.
+
+Re-check CCI for a pending connector state change after
+initialization is complete. Adjust the corresponding debug
+message accordingly.
+
+Fixes: 71a1fa0df2a3 ("usb: typec: ucsi: Store the notification mask")
+Cc: stable@vger.kernel.org
+Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
+Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
+Link: https://lore.kernel.org/r/20240320073927.1641788-3-lk@c--e.de
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/ucsi/ucsi.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/typec/ucsi/ucsi.c
++++ b/drivers/usb/typec/ucsi/ucsi.c
+@@ -854,7 +854,7 @@ void ucsi_connector_change(struct ucsi *
+       struct ucsi_connector *con = &ucsi->connector[num - 1];
+       if (!(ucsi->ntfy & UCSI_ENABLE_NTFY_CONNECTOR_CHANGE)) {
+-              dev_dbg(ucsi->dev, "Bogus connector change event\n");
++              dev_dbg(ucsi->dev, "Early connector change event\n");
+               return;
+       }
+@@ -1241,6 +1241,7 @@ static int ucsi_init(struct ucsi *ucsi)
+ {
+       struct ucsi_connector *con;
+       u64 command, ntfy;
++      u32 cci;
+       int ret;
+       int i;
+@@ -1292,6 +1293,13 @@ static int ucsi_init(struct ucsi *ucsi)
+               goto err_unregister;
+       ucsi->ntfy = ntfy;
++
++      ret = ucsi->ops->read(ucsi, UCSI_CCI, &cci, sizeof(cci));
++      if (ret)
++              return ret;
++      if (UCSI_CCI_CONNECTOR(READ_ONCE(cci)))
++              ucsi_connector_change(ucsi, cci);
++
+       return 0;
+ err_unregister:
diff --git a/queue-5.15/usb-typec-ucsi-fix-connector-check-on-init.patch b/queue-5.15/usb-typec-ucsi-fix-connector-check-on-init.patch
new file mode 100644 (file)
index 0000000..d6bf34b
--- /dev/null
@@ -0,0 +1,42 @@
+From ce4c8d21054ae9396cd759fe6e8157b525616dc4 Mon Sep 17 00:00:00 2001
+From: "Christian A. Ehrhardt" <lk@c--e.de>
+Date: Mon, 1 Apr 2024 23:05:15 +0200
+Subject: usb: typec: ucsi: Fix connector check on init
+
+From: Christian A. Ehrhardt <lk@c--e.de>
+
+commit ce4c8d21054ae9396cd759fe6e8157b525616dc4 upstream.
+
+Fix issues when initially checking for a connector change:
+- Use the correct connector number not the entire CCI.
+- Call ->read under the PPM lock.
+- Remove a bogus READ_ONCE.
+
+Fixes: 808a8b9e0b87 ("usb: typec: ucsi: Check for notifications after init")
+Cc: stable@kernel.org
+Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
+Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Link: https://lore.kernel.org/r/20240401210515.1902048-1-lk@c--e.de
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/ucsi/ucsi.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/typec/ucsi/ucsi.c
++++ b/drivers/usb/typec/ucsi/ucsi.c
+@@ -1294,11 +1294,13 @@ static int ucsi_init(struct ucsi *ucsi)
+       ucsi->ntfy = ntfy;
++      mutex_lock(&ucsi->ppm_lock);
+       ret = ucsi->ops->read(ucsi, UCSI_CCI, &cci, sizeof(cci));
++      mutex_unlock(&ucsi->ppm_lock);
+       if (ret)
+               return ret;
+-      if (UCSI_CCI_CONNECTOR(READ_ONCE(cci)))
+-              ucsi_connector_change(ucsi, cci);
++      if (UCSI_CCI_CONNECTOR(cci))
++              ucsi_connector_change(ucsi, UCSI_CCI_CONNECTOR(cci));
+       return 0;