From: Greg Kroah-Hartman Date: Tue, 5 Nov 2024 16:09:09 +0000 (+0100) Subject: 6.6-stable patches X-Git-Tag: v4.19.323~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=981c8e53d9e0ae3c3ab2b1fac9fa8f598e8250ec;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches 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 --- 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 index 00000000000..11f1e47def9 --- /dev/null +++ b/queue-6.6/alsa-usb-audio-add-quirks-for-dell-wd19-dock.patch @@ -0,0 +1,42 @@ +From 4413665dd6c528b31284119e3571c25f371e1c36 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20Sch=C3=A4r?= +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 + +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 +Cc: +Link: https://patch.msgid.link/20241029221249.15661-1-jan@jschaer.ch +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..e58056f397e --- /dev/null +++ b/queue-6.6/phy-qcom-qmp-usb-fix-null-deref-on-runtime-suspend.patch @@ -0,0 +1,41 @@ +From bd9e4d4a3b127686efc60096271b0a44c3100061 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Wed, 11 Sep 2024 13:52:50 +0200 +Subject: phy: qcom: qmp-usb: fix NULL-deref on runtime suspend + +From: Johan Hovold + +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 +Reviewed-by: Dmitry Baryshkov +Link: https://lore.kernel.org/r/20240911115253.10920-2-johan+linaro@kernel.org +Signed-off-by: Vinod Koul +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..690b5511546 --- /dev/null +++ b/queue-6.6/phy-qcom-qmp-usb-legacy-fix-null-deref-on-runtime-suspend.patch @@ -0,0 +1,43 @@ +From 29240130ab77c80bea1464317ae2a5fd29c16a0c Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Wed, 11 Sep 2024 13:52:51 +0200 +Subject: phy: qcom: qmp-usb-legacy: fix NULL-deref on runtime suspend + +From: Johan Hovold + +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 +Reviewed-by: Dmitry Baryshkov +Link: https://lore.kernel.org/r/20240911115253.10920-3-johan+linaro@kernel.org +Signed-off-by: Vinod Koul +Signed-off-by: Greg Kroah-Hartman +--- + 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) diff --git a/queue-6.6/series b/queue-6.6/series index 3eb0e8a4f68..8290a8e6fee 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -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 index 00000000000..584fab8578e --- /dev/null +++ b/queue-6.6/usb-phy-fix-api-devm_usb_put_phy-can-not-release-the-phy.patch @@ -0,0 +1,34 @@ +From fdce49b5da6e0fb6d077986dec3e90ef2b094b50 Mon Sep 17 00:00:00 2001 +From: Zijun Hu +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 + +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 +Link: https://lore.kernel.org/r/20241020-usb_phy_fix-v1-1-7f79243b8e1e@quicinc.com +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..2c0a69c1ab5 --- /dev/null +++ b/queue-6.6/usb-typec-fix-unreleased-fwnode_handle-in-typec_port_register_altmodes.patch @@ -0,0 +1,35 @@ +From 9581acb91eaf5bbe70086bbb6fca808220d358ba Mon Sep 17 00:00:00 2001 +From: Javier Carrasco +Date: Mon, 21 Oct 2024 22:45:29 +0200 +Subject: usb: typec: fix unreleased fwnode_handle in typec_port_register_altmodes() + +From: Javier Carrasco + +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 +Signed-off-by: Javier Carrasco +Link: https://lore.kernel.org/r/20241021-typec-class-fwnode_handle_put-v2-1-3281225d3d27@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..f4c15595208 --- /dev/null +++ b/queue-6.6/usb-typec-qcom-pmic-typec-use-fwnode_handle_put-to-release-fwnodes.patch @@ -0,0 +1,50 @@ +From 7f02b8a5b602098f2901166e7e4d583acaed872a Mon Sep 17 00:00:00 2001 +From: Javier Carrasco +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 + +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 +Signed-off-by: Javier Carrasco +Acked-by: Bryan O'Donoghue +Reviewed-by: Heikki Krogerus +Reviewed-by: Dmitry Baryshkov +Link: https://lore.kernel.org/r/20241020-qcom_pmic_typec-fwnode_remove-v2-1-7054f3d2e215@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..f41f9005f80 --- /dev/null +++ b/queue-6.6/usbip-tools-fix-detach_port-invalid-port-error-path.patch @@ -0,0 +1,33 @@ +From e7cd4b811c9e019f5acbce85699c622b30194c24 Mon Sep 17 00:00:00 2001 +From: Zongmin Zhou +Date: Thu, 24 Oct 2024 10:27:00 +0800 +Subject: usbip: tools: Fix detach_port() invalid port error path + +From: Zongmin Zhou + +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 +Reviewed-by: Shuah Khan +Signed-off-by: Zongmin Zhou +Link: https://lore.kernel.org/r/20241024022700.1236660-1-min_halo@163.com +Signed-off-by: Greg Kroah-Hartman +--- + 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;