]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Nov 2024 16:09:09 +0000 (17:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Nov 2024 16:09:09 +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
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-use-fwnode_handle_put-to-release-fwnodes.patch
usbip-tools-fix-detach_port-invalid-port-error-path.patch

queue-6.6/alsa-usb-audio-add-quirks-for-dell-wd19-dock.patch [new file with mode: 0644]
queue-6.6/phy-qcom-qmp-usb-fix-null-deref-on-runtime-suspend.patch [new file with mode: 0644]
queue-6.6/phy-qcom-qmp-usb-legacy-fix-null-deref-on-runtime-suspend.patch [new file with mode: 0644]
queue-6.6/series
queue-6.6/usb-phy-fix-api-devm_usb_put_phy-can-not-release-the-phy.patch [new file with mode: 0644]
queue-6.6/usb-typec-fix-unreleased-fwnode_handle-in-typec_port_register_altmodes.patch [new file with mode: 0644]
queue-6.6/usb-typec-qcom-pmic-typec-use-fwnode_handle_put-to-release-fwnodes.patch [new file with mode: 0644]
queue-6.6/usbip-tools-fix-detach_port-invalid-port-error-path.patch [new file with mode: 0644]

diff --git a/queue-6.6/alsa-usb-audio-add-quirks-for-dell-wd19-dock.patch b/queue-6.6/alsa-usb-audio-add-quirks-for-dell-wd19-dock.patch
new file mode 100644 (file)
index 0000000..11f1e47
--- /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
+@@ -3465,6 +3465,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.6/phy-qcom-qmp-usb-fix-null-deref-on-runtime-suspend.patch b/queue-6.6/phy-qcom-qmp-usb-fix-null-deref-on-runtime-suspend.patch
new file mode 100644 (file)
index 0000000..e58056f
--- /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
+@@ -2173,6 +2173,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.6/phy-qcom-qmp-usb-legacy-fix-null-deref-on-runtime-suspend.patch b/queue-6.6/phy-qcom-qmp-usb-legacy-fix-null-deref-on-runtime-suspend.patch
new file mode 100644 (file)
index 0000000..690b551
--- /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
+@@ -1302,6 +1302,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)
index 3eb0e8a4f6853d7a2bdd4acc8c3c246d94d5a756..8290a8e6feee9b90eae3b4f300109a0cf3aeadeb 100644 (file)
@@ -77,3 +77,10 @@ rcu-tasks-pull-sampling-of-percpu_dequeue_lim-out-of.patch
 rcu-tasks-add-data-to-eliminate-rcu-tasks-do_exit-de.patch
 rcu-tasks-initialize-data-to-eliminate-rcu-tasks-do_.patch
 rcu-tasks-fix-access-non-existent-percpu-rtpcp-varia.patch
+alsa-usb-audio-add-quirks-for-dell-wd19-dock.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-qcom-pmic-typec-use-fwnode_handle_put-to-release-fwnodes.patch
+phy-qcom-qmp-usb-fix-null-deref-on-runtime-suspend.patch
+phy-qcom-qmp-usb-legacy-fix-null-deref-on-runtime-suspend.patch
diff --git a/queue-6.6/usb-phy-fix-api-devm_usb_put_phy-can-not-release-the-phy.patch b/queue-6.6/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.6/usb-typec-fix-unreleased-fwnode_handle-in-typec_port_register_altmodes.patch b/queue-6.6/usb-typec-fix-unreleased-fwnode_handle-in-typec_port_register_altmodes.patch
new file mode 100644 (file)
index 0000000..2c0a69c
--- /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
+@@ -2194,6 +2194,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.6/usb-typec-qcom-pmic-typec-use-fwnode_handle_put-to-release-fwnodes.patch b/queue-6.6/usb-typec-qcom-pmic-typec-use-fwnode_handle_put-to-release-fwnodes.patch
new file mode 100644 (file)
index 0000000..f4c1559
--- /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
+@@ -268,7 +268,7 @@ static int qcom_pmic_typec_probe(struct
+       return 0;
+ fwnode_remove:
+-      fwnode_remove_software_node(tcpm->tcpc.fwnode);
++      fwnode_handle_put(tcpm->tcpc.fwnode);
+       return ret;
+ }
+@@ -280,7 +280,7 @@ static void qcom_pmic_typec_remove(struc
+       qcom_pmic_typec_pdphy_stop(tcpm->pmic_typec_pdphy);
+       qcom_pmic_typec_port_stop(tcpm->pmic_typec_port);
+       tcpm_unregister_port(tcpm->tcpm_port);
+-      fwnode_remove_software_node(tcpm->tcpc.fwnode);
++      fwnode_handle_put(tcpm->tcpc.fwnode);
+ }
+ static struct pmic_typec_pdphy_resources pm8150b_pdphy_res = {
diff --git a/queue-6.6/usbip-tools-fix-detach_port-invalid-port-error-path.patch b/queue-6.6/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;