]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Mar 2026 11:23:57 +0000 (12:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Mar 2026 11:23:57 +0000 (12:23 +0100)
added patches:
revert-tcpm-allow-looking-for-role_sw-device-in-the-main-node.patch

queue-6.6/revert-tcpm-allow-looking-for-role_sw-device-in-the-main-node.patch [new file with mode: 0644]
queue-6.6/series

diff --git a/queue-6.6/revert-tcpm-allow-looking-for-role_sw-device-in-the-main-node.patch b/queue-6.6/revert-tcpm-allow-looking-for-role_sw-device-in-the-main-node.patch
new file mode 100644 (file)
index 0000000..82b0fb9
--- /dev/null
@@ -0,0 +1,42 @@
+From 6b275bfaa16be3fb1689fa6794e445ecd127a1b4 Mon Sep 17 00:00:00 2001
+From: Xu Yang <xu.yang_2@nxp.com>
+Date: Mon, 9 Mar 2026 15:43:12 +0800
+Subject: Revert "tcpm: allow looking for role_sw device in the main node"
+
+From: Xu Yang <xu.yang_2@nxp.com>
+
+commit 6b275bfaa16be3fb1689fa6794e445ecd127a1b4 upstream.
+
+This reverts commit 1366cd228b0c67b60a2c0c26ef37fe9f7cfedb7f.
+
+The fwnode_usb_role_switch_get() returns NULL only if no connection is
+found, returns ERR_PTR(-EPROBE_DEFER) if connection is found but deferred
+probe is needed, or a valid pointer of usb_role_switch.
+
+When switching from a NULL check to IS_ERR_OR_NULL(), usb_role_switch_get()
+returns NULL and overwrites the ERR_PTR(-EPROBE_DEFER) returned by
+fwnode_usb_role_switch_get(). This causes the deferred probe indication to
+be lost, preventing the USB role switch from ever being retrieved.
+
+Fixes: 1366cd228b0c ("tcpm: allow looking for role_sw device in the main node")
+Cc: stable <stable@kernel.org>
+Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
+Tested-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
+Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Link: https://patch.msgid.link/20260309074313.2809867-2-xu.yang_2@nxp.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/tcpm/tcpm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/typec/tcpm/tcpm.c
++++ b/drivers/usb/typec/tcpm/tcpm.c
+@@ -6637,7 +6637,7 @@ struct tcpm_port *tcpm_register_port(str
+       port->port_type = port->typec_caps.type;
+       port->role_sw = fwnode_usb_role_switch_get(tcpc->fwnode);
+-      if (IS_ERR_OR_NULL(port->role_sw))
++      if (!port->role_sw)
+               port->role_sw = usb_role_switch_get(port->dev);
+       if (IS_ERR(port->role_sw)) {
+               err = PTR_ERR(port->role_sw);
index 8d0647d3b5dbd5c564b8a51888896090d08cd6f9..e42b71da6c774901e8e816233ccc79b083857944 100644 (file)
@@ -304,3 +304,4 @@ scsi-ufs-core-fix-serror-in-ufshcd_rtc_work-during-u.patch
 scsi-hisi_sas-add-time-interval-between-two-h2d-fis-.patch
 scsi-hisi_sas-use-macro-instead-of-magic-number.patch
 scsi-hisi_sas-fix-null-pointer-exception-during-user.patch
+revert-tcpm-allow-looking-for-role_sw-device-in-the-main-node.patch