]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.11-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Nov 2024 16:09:18 +0000 (17:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Nov 2024 16:09:18 +0000 (17:09 +0100)
added patches:
alsa-usb-audio-add-quirks-for-dell-wd19-dock.patch
phy-qcom-qmp-usb-fix-null-deref-on-runtime-suspend.patch
phy-qcom-qmp-usb-legacy-fix-null-deref-on-runtime-suspend.patch
phy-qcom-qmp-usbc-fix-null-deref-on-runtime-suspend.patch
usb-phy-fix-api-devm_usb_put_phy-can-not-release-the-phy.patch
usb-typec-fix-unreleased-fwnode_handle-in-typec_port_register_altmodes.patch
usb-typec-qcom-pmic-typec-fix-missing-fwnode-removal-in-error-path.patch
usb-typec-qcom-pmic-typec-use-fwnode_handle_put-to-release-fwnodes.patch
usb-typec-tcpm-restrict-snk_wait_capabilities_timeout-transitions-to-non-self-powered-devices.patch
usbip-tools-fix-detach_port-invalid-port-error-path.patch
wifi-rtlwifi-rtl8192du-don-t-claim-usb-id-0bda-8171.patch

12 files changed:
queue-6.11/alsa-usb-audio-add-quirks-for-dell-wd19-dock.patch [new file with mode: 0644]
queue-6.11/phy-qcom-qmp-usb-fix-null-deref-on-runtime-suspend.patch [new file with mode: 0644]
queue-6.11/phy-qcom-qmp-usb-legacy-fix-null-deref-on-runtime-suspend.patch [new file with mode: 0644]
queue-6.11/phy-qcom-qmp-usbc-fix-null-deref-on-runtime-suspend.patch [new file with mode: 0644]
queue-6.11/series
queue-6.11/usb-phy-fix-api-devm_usb_put_phy-can-not-release-the-phy.patch [new file with mode: 0644]
queue-6.11/usb-typec-fix-unreleased-fwnode_handle-in-typec_port_register_altmodes.patch [new file with mode: 0644]
queue-6.11/usb-typec-qcom-pmic-typec-fix-missing-fwnode-removal-in-error-path.patch [new file with mode: 0644]
queue-6.11/usb-typec-qcom-pmic-typec-use-fwnode_handle_put-to-release-fwnodes.patch [new file with mode: 0644]
queue-6.11/usb-typec-tcpm-restrict-snk_wait_capabilities_timeout-transitions-to-non-self-powered-devices.patch [new file with mode: 0644]
queue-6.11/usbip-tools-fix-detach_port-invalid-port-error-path.patch [new file with mode: 0644]
queue-6.11/wifi-rtlwifi-rtl8192du-don-t-claim-usb-id-0bda-8171.patch [new file with mode: 0644]

diff --git a/queue-6.11/alsa-usb-audio-add-quirks-for-dell-wd19-dock.patch b/queue-6.11/alsa-usb-audio-add-quirks-for-dell-wd19-dock.patch
new file mode 100644 (file)
index 0000000..60d9302
--- /dev/null
@@ -0,0 +1,42 @@
+From 4413665dd6c528b31284119e3571c25f371e1c36 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Sch=C3=A4r?= <jan@jschaer.ch>
+Date: Tue, 29 Oct 2024 23:12:49 +0100
+Subject: ALSA: usb-audio: Add quirks for Dell WD19 dock
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jan Schär <jan@jschaer.ch>
+
+commit 4413665dd6c528b31284119e3571c25f371e1c36 upstream.
+
+The WD19 family of docks has the same audio chipset as the WD15. This
+change enables jack detection on the WD19.
+
+We don't need the dell_dock_mixer_init quirk for the WD19. It is only
+needed because of the dell_alc4020_map quirk for the WD15 in
+mixer_maps.c, which disables the volume controls. Even for the WD15,
+this quirk was apparently only needed when the dock firmware was not
+updated.
+
+Signed-off-by: Jan Schär <jan@jschaer.ch>
+Cc: <stable@vger.kernel.org>
+Link: https://patch.msgid.link/20241029221249.15661-1-jan@jschaer.ch
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/usb/mixer_quirks.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/sound/usb/mixer_quirks.c
++++ b/sound/usb/mixer_quirks.c
+@@ -3880,6 +3880,9 @@ int snd_usb_mixer_apply_create_quirk(str
+                       break;
+               err = dell_dock_mixer_init(mixer);
+               break;
++      case USB_ID(0x0bda, 0x402e): /* Dell WD19 dock */
++              err = dell_dock_mixer_create(mixer);
++              break;
+       case USB_ID(0x2a39, 0x3fd2): /* RME ADI-2 Pro */
+       case USB_ID(0x2a39, 0x3fd3): /* RME ADI-2 DAC */
diff --git a/queue-6.11/phy-qcom-qmp-usb-fix-null-deref-on-runtime-suspend.patch b/queue-6.11/phy-qcom-qmp-usb-fix-null-deref-on-runtime-suspend.patch
new file mode 100644 (file)
index 0000000..51e6642
--- /dev/null
@@ -0,0 +1,41 @@
+From bd9e4d4a3b127686efc60096271b0a44c3100061 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan+linaro@kernel.org>
+Date: Wed, 11 Sep 2024 13:52:50 +0200
+Subject: phy: qcom: qmp-usb: fix NULL-deref on runtime suspend
+
+From: Johan Hovold <johan+linaro@kernel.org>
+
+commit bd9e4d4a3b127686efc60096271b0a44c3100061 upstream.
+
+Commit 413db06c05e7 ("phy: qcom-qmp-usb: clean up probe initialisation")
+removed most users of the platform device driver data, but mistakenly
+also removed the initialisation despite the data still being used in the
+runtime PM callbacks.
+
+Restore the driver data initialisation at probe to avoid a NULL-pointer
+dereference on runtime suspend.
+
+Apparently no one uses runtime PM, which currently needs to be enabled
+manually through sysfs, with this driver.
+
+Fixes: 413db06c05e7 ("phy: qcom-qmp-usb: clean up probe initialisation")
+Cc: stable@vger.kernel.org     # 6.2
+Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Link: https://lore.kernel.org/r/20240911115253.10920-2-johan+linaro@kernel.org
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/phy/qualcomm/phy-qcom-qmp-usb.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
++++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+@@ -2179,6 +2179,7 @@ static int qmp_usb_probe(struct platform
+               return -ENOMEM;
+       qmp->dev = dev;
++      dev_set_drvdata(dev, qmp);
+       qmp->cfg = of_device_get_match_data(dev);
+       if (!qmp->cfg)
diff --git a/queue-6.11/phy-qcom-qmp-usb-legacy-fix-null-deref-on-runtime-suspend.patch b/queue-6.11/phy-qcom-qmp-usb-legacy-fix-null-deref-on-runtime-suspend.patch
new file mode 100644 (file)
index 0000000..530389b
--- /dev/null
@@ -0,0 +1,43 @@
+From 29240130ab77c80bea1464317ae2a5fd29c16a0c Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan+linaro@kernel.org>
+Date: Wed, 11 Sep 2024 13:52:51 +0200
+Subject: phy: qcom: qmp-usb-legacy: fix NULL-deref on runtime suspend
+
+From: Johan Hovold <johan+linaro@kernel.org>
+
+commit 29240130ab77c80bea1464317ae2a5fd29c16a0c upstream.
+
+Commit 413db06c05e7 ("phy: qcom-qmp-usb: clean up probe initialisation")
+removed most users of the platform device driver data from the
+qcom-qmp-usb driver, but mistakenly also removed the initialisation
+despite the data still being used in the runtime PM callbacks. This bug
+was later reproduced when the driver was copied to create the
+qmp-usb-legacy driver.
+
+Restore the driver data initialisation at probe to avoid a NULL-pointer
+dereference on runtime suspend.
+
+Apparently no one uses runtime PM, which currently needs to be enabled
+manually through sysfs, with these drivers.
+
+Fixes: e464a3180a43 ("phy: qcom-qmp-usb: split off the legacy USB+dp_com support")
+Cc: stable@vger.kernel.org     # 6.6
+Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Link: https://lore.kernel.org/r/20240911115253.10920-3-johan+linaro@kernel.org
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c
++++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c
+@@ -1248,6 +1248,7 @@ static int qmp_usb_legacy_probe(struct p
+               return -ENOMEM;
+       qmp->dev = dev;
++      dev_set_drvdata(dev, qmp);
+       qmp->cfg = of_device_get_match_data(dev);
+       if (!qmp->cfg)
diff --git a/queue-6.11/phy-qcom-qmp-usbc-fix-null-deref-on-runtime-suspend.patch b/queue-6.11/phy-qcom-qmp-usbc-fix-null-deref-on-runtime-suspend.patch
new file mode 100644 (file)
index 0000000..8ee9347
--- /dev/null
@@ -0,0 +1,43 @@
+From 34c21f94fa1e147a19b54b6adf0c93a623b70dd8 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan+linaro@kernel.org>
+Date: Wed, 11 Sep 2024 13:52:52 +0200
+Subject: phy: qcom: qmp-usbc: fix NULL-deref on runtime suspend
+
+From: Johan Hovold <johan+linaro@kernel.org>
+
+commit 34c21f94fa1e147a19b54b6adf0c93a623b70dd8 upstream.
+
+Commit 413db06c05e7 ("phy: qcom-qmp-usb: clean up probe initialisation")
+removed most users of the platform device driver data from the
+qcom-qmp-usb driver, but mistakenly also removed the initialisation
+despite the data still being used in the runtime PM callbacks. This bug
+was later reproduced when the driver was copied to create the qmp-usbc
+driver.
+
+Restore the driver data initialisation at probe to avoid a NULL-pointer
+dereference on runtime suspend.
+
+Apparently no one uses runtime PM, which currently needs to be enabled
+manually through sysfs, with these drivers.
+
+Fixes: 19281571a4d5 ("phy: qcom: qmp-usb: split USB-C PHY driver")
+Cc: stable@vger.kernel.org     # 6.9
+Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Link: https://lore.kernel.org/r/20240911115253.10920-4-johan+linaro@kernel.org
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/phy/qualcomm/phy-qcom-qmp-usbc.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
++++ b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
+@@ -1049,6 +1049,7 @@ static int qmp_usbc_probe(struct platfor
+               return -ENOMEM;
+       qmp->dev = dev;
++      dev_set_drvdata(dev, qmp);
+       qmp->orientation = TYPEC_ORIENTATION_NORMAL;
index fbea815a14de34de628fbe35b866f8dbc4be3169..7f62dfa3102f73ad984146e1f50e54e73fcf4cf8 100644 (file)
@@ -102,3 +102,14 @@ misc-sgi-gru-don-t-disable-preemption-in-gru-driver.patch
 nfsd-initialize-struct-nfsd4_copy-earlier.patch
 nfsd-never-decrement-pending_async_copies-on-error.patch
 rpcrdma-always-release-the-rpcrdma_device-s-xa_array.patch
+alsa-usb-audio-add-quirks-for-dell-wd19-dock.patch
+wifi-rtlwifi-rtl8192du-don-t-claim-usb-id-0bda-8171.patch
+usbip-tools-fix-detach_port-invalid-port-error-path.patch
+usb-phy-fix-api-devm_usb_put_phy-can-not-release-the-phy.patch
+usb-typec-fix-unreleased-fwnode_handle-in-typec_port_register_altmodes.patch
+usb-typec-tcpm-restrict-snk_wait_capabilities_timeout-transitions-to-non-self-powered-devices.patch
+usb-typec-qcom-pmic-typec-use-fwnode_handle_put-to-release-fwnodes.patch
+usb-typec-qcom-pmic-typec-fix-missing-fwnode-removal-in-error-path.patch
+phy-qcom-qmp-usb-fix-null-deref-on-runtime-suspend.patch
+phy-qcom-qmp-usb-legacy-fix-null-deref-on-runtime-suspend.patch
+phy-qcom-qmp-usbc-fix-null-deref-on-runtime-suspend.patch
diff --git a/queue-6.11/usb-phy-fix-api-devm_usb_put_phy-can-not-release-the-phy.patch b/queue-6.11/usb-phy-fix-api-devm_usb_put_phy-can-not-release-the-phy.patch
new file mode 100644 (file)
index 0000000..584fab8
--- /dev/null
@@ -0,0 +1,34 @@
+From fdce49b5da6e0fb6d077986dec3e90ef2b094b50 Mon Sep 17 00:00:00 2001
+From: Zijun Hu <quic_zijuhu@quicinc.com>
+Date: Sun, 20 Oct 2024 17:33:42 +0800
+Subject: usb: phy: Fix API devm_usb_put_phy() can not release the phy
+
+From: Zijun Hu <quic_zijuhu@quicinc.com>
+
+commit fdce49b5da6e0fb6d077986dec3e90ef2b094b50 upstream.
+
+For devm_usb_put_phy(), its comment says it needs to invoke usb_put_phy()
+to release the phy, but it does not do that actually, so it can not fully
+undo what the API devm_usb_get_phy() does, that is wrong, fixed by using
+devres_release() instead of devres_destroy() within the API.
+
+Fixes: cedf8602373a ("usb: phy: move bulk of otg/otg.c to phy/phy.c")
+Cc: stable@vger.kernel.org
+Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
+Link: https://lore.kernel.org/r/20241020-usb_phy_fix-v1-1-7f79243b8e1e@quicinc.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/phy/phy.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/phy/phy.c
++++ b/drivers/usb/phy/phy.c
+@@ -628,7 +628,7 @@ void devm_usb_put_phy(struct device *dev
+ {
+       int r;
+-      r = devres_destroy(dev, devm_usb_phy_release, devm_usb_phy_match, phy);
++      r = devres_release(dev, devm_usb_phy_release, devm_usb_phy_match, phy);
+       dev_WARN_ONCE(dev, r, "couldn't find PHY resource\n");
+ }
+ EXPORT_SYMBOL_GPL(devm_usb_put_phy);
diff --git a/queue-6.11/usb-typec-fix-unreleased-fwnode_handle-in-typec_port_register_altmodes.patch b/queue-6.11/usb-typec-fix-unreleased-fwnode_handle-in-typec_port_register_altmodes.patch
new file mode 100644 (file)
index 0000000..7d4e834
--- /dev/null
@@ -0,0 +1,35 @@
+From 9581acb91eaf5bbe70086bbb6fca808220d358ba Mon Sep 17 00:00:00 2001
+From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+Date: Mon, 21 Oct 2024 22:45:29 +0200
+Subject: usb: typec: fix unreleased fwnode_handle in typec_port_register_altmodes()
+
+From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+commit 9581acb91eaf5bbe70086bbb6fca808220d358ba upstream.
+
+The 'altmodes_node' fwnode_handle is never released after it is no
+longer required, which leaks the resource.
+
+Add the required call to fwnode_handle_put() when 'altmodes_node' is no
+longer required.
+
+Cc: stable@vger.kernel.org
+Fixes: 7b458a4c5d73 ("usb: typec: Add typec_port_register_altmodes()")
+Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+Link: https://lore.kernel.org/r/20241021-typec-class-fwnode_handle_put-v2-1-3281225d3d27@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/class.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/typec/class.c
++++ b/drivers/usb/typec/class.c
+@@ -2341,6 +2341,7 @@ void typec_port_register_altmodes(struct
+               altmodes[index] = alt;
+               index++;
+       }
++      fwnode_handle_put(altmodes_node);
+ }
+ EXPORT_SYMBOL_GPL(typec_port_register_altmodes);
diff --git a/queue-6.11/usb-typec-qcom-pmic-typec-fix-missing-fwnode-removal-in-error-path.patch b/queue-6.11/usb-typec-qcom-pmic-typec-fix-missing-fwnode-removal-in-error-path.patch
new file mode 100644 (file)
index 0000000..3da5486
--- /dev/null
@@ -0,0 +1,48 @@
+From b8423a2f5814dbf055ed7c41f25bfe91c2066cbe Mon Sep 17 00:00:00 2001
+From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+Date: Sun, 20 Oct 2024 14:56:35 +0200
+Subject: usb: typec: qcom-pmic-typec: fix missing fwnode removal in error path
+
+From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+commit b8423a2f5814dbf055ed7c41f25bfe91c2066cbe upstream.
+
+If drm_dp_hpd_bridge_register() fails, the probe function returns
+without removing the fwnode via fwnode_handle_put(), leaking the
+resource.
+
+Jump to fwnode_remove if drm_dp_hpd_bridge_register() fails to remove
+the fwnode acquired with device_get_named_child_node().
+
+Cc: stable@vger.kernel.org
+Fixes: 7d9f1b72b296 ("usb: typec: qcom-pmic-typec: switch to DRM_AUX_HPD_BRIDGE")
+Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Link: https://lore.kernel.org/r/20241020-qcom_pmic_typec-fwnode_remove-v2-2-7054f3d2e215@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
+index 7d9d37c16fad..b80eb2d78d88 100644
+--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
++++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
+@@ -93,8 +93,10 @@ static int qcom_pmic_typec_probe(struct platform_device *pdev)
+               return -EINVAL;
+       bridge_dev = devm_drm_dp_hpd_bridge_alloc(tcpm->dev, to_of_node(tcpm->tcpc.fwnode));
+-      if (IS_ERR(bridge_dev))
+-              return PTR_ERR(bridge_dev);
++      if (IS_ERR(bridge_dev)) {
++              ret = PTR_ERR(bridge_dev);
++              goto fwnode_remove;
++      }
+       tcpm->tcpm_port = tcpm_register_port(tcpm->dev, &tcpm->tcpc);
+       if (IS_ERR(tcpm->tcpm_port)) {
+-- 
+2.47.0
+
diff --git a/queue-6.11/usb-typec-qcom-pmic-typec-use-fwnode_handle_put-to-release-fwnodes.patch b/queue-6.11/usb-typec-qcom-pmic-typec-use-fwnode_handle_put-to-release-fwnodes.patch
new file mode 100644 (file)
index 0000000..b11854f
--- /dev/null
@@ -0,0 +1,50 @@
+From 7f02b8a5b602098f2901166e7e4d583acaed872a Mon Sep 17 00:00:00 2001
+From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+Date: Sun, 20 Oct 2024 14:56:34 +0200
+Subject: usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes
+
+From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+
+commit 7f02b8a5b602098f2901166e7e4d583acaed872a upstream.
+
+The right function to release a fwnode acquired via
+device_get_named_child_node() is fwnode_handle_put(), and not
+fwnode_remove_software_node(), as no software node is being handled.
+
+Replace the calls to fwnode_remove_software_node() with
+fwnode_handle_put() in qcom_pmic_typec_probe() and
+qcom_pmic_typec_remove().
+
+Cc: stable@vger.kernel.org
+Fixes: a4422ff22142 ("usb: typec: qcom: Add Qualcomm PMIC Type-C driver")
+Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
+Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
+Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Link: https://lore.kernel.org/r/20241020-qcom_pmic_typec-fwnode_remove-v2-1-7054f3d2e215@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
++++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c
+@@ -123,7 +123,7 @@ port_stop:
+ port_unregister:
+       tcpm_unregister_port(tcpm->tcpm_port);
+ fwnode_remove:
+-      fwnode_remove_software_node(tcpm->tcpc.fwnode);
++      fwnode_handle_put(tcpm->tcpc.fwnode);
+       return ret;
+ }
+@@ -135,7 +135,7 @@ static void qcom_pmic_typec_remove(struc
+       tcpm->pdphy_stop(tcpm);
+       tcpm->port_stop(tcpm);
+       tcpm_unregister_port(tcpm->tcpm_port);
+-      fwnode_remove_software_node(tcpm->tcpc.fwnode);
++      fwnode_handle_put(tcpm->tcpc.fwnode);
+ }
+ static const struct pmic_typec_resources pm8150b_typec_res = {
diff --git a/queue-6.11/usb-typec-tcpm-restrict-snk_wait_capabilities_timeout-transitions-to-non-self-powered-devices.patch b/queue-6.11/usb-typec-tcpm-restrict-snk_wait_capabilities_timeout-transitions-to-non-self-powered-devices.patch
new file mode 100644 (file)
index 0000000..719fc16
--- /dev/null
@@ -0,0 +1,81 @@
+From afb92ad8733ef0a2843cc229e4d96aead80bc429 Mon Sep 17 00:00:00 2001
+From: Amit Sunil Dhamne <amitsd@google.com>
+Date: Wed, 23 Oct 2024 19:22:30 -0700
+Subject: usb: typec: tcpm: restrict SNK_WAIT_CAPABILITIES_TIMEOUT transitions to non self-powered devices
+
+From: Amit Sunil Dhamne <amitsd@google.com>
+
+commit afb92ad8733ef0a2843cc229e4d96aead80bc429 upstream.
+
+PD3.1 spec ("8.3.3.3.3 PE_SNK_Wait_for_Capabilities State") mandates
+that the policy engine perform a hard reset when SinkWaitCapTimer
+expires. Instead the code explicitly does a GET_SOURCE_CAP when the
+timer expires as part of SNK_WAIT_CAPABILITIES_TIMEOUT. Due to this the
+following compliance test failures are reported by the compliance tester
+(added excerpts from the PD Test Spec):
+
+* COMMON.PROC.PD.2#1:
+  The Tester receives a Get_Source_Cap Message from the UUT. This
+  message is valid except the following conditions: [COMMON.PROC.PD.2#1]
+    a. The check fails if the UUT sends this message before the Tester
+       has established an Explicit Contract
+    ...
+
+* TEST.PD.PROT.SNK.4:
+  ...
+  4. The check fails if the UUT does not send a Hard Reset between
+    tTypeCSinkWaitCap min and max. [TEST.PD.PROT.SNK.4#1] The delay is
+    between the VBUS present vSafe5V min and the time of the first bit
+    of Preamble of the Hard Reset sent by the UUT.
+
+For the purpose of interoperability, restrict the quirk introduced in
+https://lore.kernel.org/all/20240523171806.223727-1-sebastian.reichel@collabora.com/
+to only non self-powered devices as battery powered devices will not
+have the issue mentioned in that commit.
+
+Cc: stable@vger.kernel.org
+Fixes: 122968f8dda8 ("usb: typec: tcpm: avoid resets for missing source capability messages")
+Reported-by: Badhri Jagan Sridharan <badhri@google.com>
+Closes: https://lore.kernel.org/all/CAPTae5LAwsVugb0dxuKLHFqncjeZeJ785nkY4Jfd+M-tCjHSnQ@mail.gmail.com/
+Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
+Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
+Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Tested-by: Xu Yang <xu.yang_2@nxp.com>
+Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
+Link: https://lore.kernel.org/r/20241024022233.3276995-1-amitsd@google.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/typec/tcpm/tcpm.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
+index fc619478200f..7ae341a40342 100644
+--- a/drivers/usb/typec/tcpm/tcpm.c
++++ b/drivers/usb/typec/tcpm/tcpm.c
+@@ -4515,7 +4515,8 @@ static inline enum tcpm_state hard_reset_state(struct tcpm_port *port)
+               return ERROR_RECOVERY;
+       if (port->pwr_role == TYPEC_SOURCE)
+               return SRC_UNATTACHED;
+-      if (port->state == SNK_WAIT_CAPABILITIES_TIMEOUT)
++      if (port->state == SNK_WAIT_CAPABILITIES ||
++          port->state == SNK_WAIT_CAPABILITIES_TIMEOUT)
+               return SNK_READY;
+       return SNK_UNATTACHED;
+ }
+@@ -5043,8 +5044,11 @@ static void run_state_machine(struct tcpm_port *port)
+                       tcpm_set_state(port, SNK_SOFT_RESET,
+                                      PD_T_SINK_WAIT_CAP);
+               } else {
+-                      tcpm_set_state(port, SNK_WAIT_CAPABILITIES_TIMEOUT,
+-                                     PD_T_SINK_WAIT_CAP);
++                      if (!port->self_powered)
++                              upcoming_state = SNK_WAIT_CAPABILITIES_TIMEOUT;
++                      else
++                              upcoming_state = hard_reset_state(port);
++                      tcpm_set_state(port, upcoming_state, PD_T_SINK_WAIT_CAP);
+               }
+               break;
+       case SNK_WAIT_CAPABILITIES_TIMEOUT:
+-- 
+2.47.0
+
diff --git a/queue-6.11/usbip-tools-fix-detach_port-invalid-port-error-path.patch b/queue-6.11/usbip-tools-fix-detach_port-invalid-port-error-path.patch
new file mode 100644 (file)
index 0000000..f41f900
--- /dev/null
@@ -0,0 +1,33 @@
+From e7cd4b811c9e019f5acbce85699c622b30194c24 Mon Sep 17 00:00:00 2001
+From: Zongmin Zhou <zhouzongmin@kylinos.cn>
+Date: Thu, 24 Oct 2024 10:27:00 +0800
+Subject: usbip: tools: Fix detach_port() invalid port error path
+
+From: Zongmin Zhou <zhouzongmin@kylinos.cn>
+
+commit e7cd4b811c9e019f5acbce85699c622b30194c24 upstream.
+
+The detach_port() doesn't return error
+when detach is attempted on an invalid port.
+
+Fixes: 40ecdeb1a187 ("usbip: usbip_detach: fix to check for invalid ports")
+Cc: stable@vger.kernel.org
+Reviewed-by: Hongren Zheng <i@zenithal.me>
+Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
+Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn>
+Link: https://lore.kernel.org/r/20241024022700.1236660-1-min_halo@163.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/usb/usbip/src/usbip_detach.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/tools/usb/usbip/src/usbip_detach.c
++++ b/tools/usb/usbip/src/usbip_detach.c
+@@ -68,6 +68,7 @@ static int detach_port(char *port)
+       }
+       if (!found) {
++              ret = -1;
+               err("Invalid port %s > maxports %d",
+                       port, vhci_driver->nports);
+               goto call_driver_close;
diff --git a/queue-6.11/wifi-rtlwifi-rtl8192du-don-t-claim-usb-id-0bda-8171.patch b/queue-6.11/wifi-rtlwifi-rtl8192du-don-t-claim-usb-id-0bda-8171.patch
new file mode 100644 (file)
index 0000000..4d07e92
--- /dev/null
@@ -0,0 +1,46 @@
+From a95d28a8a2f76c591a195c06ea15f5b15c66c3d1 Mon Sep 17 00:00:00 2001
+From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
+Date: Thu, 10 Oct 2024 18:34:43 +0300
+Subject: wifi: rtlwifi: rtl8192du: Don't claim USB ID 0bda:8171
+
+From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
+
+commit a95d28a8a2f76c591a195c06ea15f5b15c66c3d1 upstream.
+
+This ID appears to be RTL8188SU, not RTL8192DU. This is the wrong driver
+for RTL8188SU. The r8712u driver from staging handles this ID.
+
+I think this ID comes from the original rtl8192du driver from Realtek.
+I don't know if they added it by mistake, or it was actually used for
+two different chips.
+
+RTL8188SU with this ID exists in the wild. RTL8192DU with this ID
+probably doesn't.
+
+Fixes: b5dc8873b6ff ("wifi: rtlwifi: Add rtl8192du/sw.c")
+Cc: stable@vger.kernel.org # v6.11
+Closes: https://github.com/lwfinger/rtl8192du/issues/105
+Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
+Acked-by: Ping-Ke Shih <pkshih@realtek.com>
+Signed-off-by: Kalle Valo <kvalo@kernel.org>
+Link: https://patch.msgid.link/40245564-41fe-4a5e-881f-cd517255b20a@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c
+index d069a81ac617..cc699efa9c79 100644
+--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c
++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c
+@@ -352,7 +352,6 @@ static const struct usb_device_id rtl8192d_usb_ids[] = {
+       {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8194, rtl92du_hal_cfg)},
+       {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8111, rtl92du_hal_cfg)},
+       {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x0193, rtl92du_hal_cfg)},
+-      {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8171, rtl92du_hal_cfg)},
+       {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0xe194, rtl92du_hal_cfg)},
+       {RTL_USB_DEVICE(0x2019, 0xab2c, rtl92du_hal_cfg)},
+       {RTL_USB_DEVICE(0x2019, 0xab2d, rtl92du_hal_cfg)},
+-- 
+2.47.0
+