From: Greg Kroah-Hartman Date: Sun, 16 Jul 2023 18:59:53 +0000 (+0200) Subject: drop some patches that were not needed for the real fixes for 5.4 and 5.10 X-Git-Tag: v6.1.39~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5cabe56ae2aec60157557ffdab1ebaa5c974fb03;p=thirdparty%2Fkernel%2Fstable-queue.git drop some patches that were not needed for the real fixes for 5.4 and 5.10 --- diff --git a/queue-5.10/series b/queue-5.10/series index 1ab45bd7e2b..3aedddf3611 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -242,8 +242,6 @@ mfd-rt5033-drop-rt5033-battery-sub-device.patch media-venus-helpers-fix-align-of-non-power-of-two.patch media-atomisp-gmin_platform-fix-out_len-in-gmin_get_.patch kvm-s390-fix-kvm_s390_get_cmma_bits-for-gfns-in-mems.patch -software-node-introduce-device_add_software_node.patch -usb-dwc3-qcom-constify-the-software-node.patch usb-dwc3-qcom-release-the-correct-resources-in-dwc3_.patch usb-dwc3-qcom-fix-an-error-handling-path-in-dwc3_qco.patch usb-common-usb-conn-gpio-set-last-role-to-unknown-be.patch diff --git a/queue-5.10/software-node-introduce-device_add_software_node.patch b/queue-5.10/software-node-introduce-device_add_software_node.patch deleted file mode 100644 index eebb8ee80b0..00000000000 --- a/queue-5.10/software-node-introduce-device_add_software_node.patch +++ /dev/null @@ -1,135 +0,0 @@ -From 70ebfaf109149b9931cae59d35f6de74b7d25592 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 15 Jan 2021 12:49:11 +0300 -Subject: software node: Introduce device_add_software_node() - -From: Heikki Krogerus - -[ Upstream commit e68d0119e3284334de5650a1ac42ef4e179f895e ] - -This helper will register a software node and then assign -it to device at the same time. The function will also make -sure that the device can't have more than one software node. - -Acked-by: Felipe Balbi -Signed-off-by: Heikki Krogerus -Link: https://lore.kernel.org/r/20210115094914.88401-2-heikki.krogerus@linux.intel.com -Signed-off-by: Greg Kroah-Hartman -Stable-dep-of: 8fd95da2cfb5 ("usb: dwc3: qcom: Release the correct resources in dwc3_qcom_remove()") -Signed-off-by: Sasha Levin ---- - drivers/base/swnode.c | 71 +++++++++++++++++++++++++++++++++++----- - include/linux/property.h | 3 ++ - 2 files changed, 65 insertions(+), 9 deletions(-) - -diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c -index d2fb3eb5816c3..572a53e6f2e88 100644 ---- a/drivers/base/swnode.c -+++ b/drivers/base/swnode.c -@@ -48,6 +48,19 @@ EXPORT_SYMBOL_GPL(is_software_node); - struct swnode, fwnode) : NULL; \ - }) - -+static inline struct swnode *dev_to_swnode(struct device *dev) -+{ -+ struct fwnode_handle *fwnode = dev_fwnode(dev); -+ -+ if (!fwnode) -+ return NULL; -+ -+ if (!is_software_node(fwnode)) -+ fwnode = fwnode->secondary; -+ -+ return to_swnode(fwnode); -+} -+ - static struct swnode * - software_node_to_swnode(const struct software_node *node) - { -@@ -850,22 +863,62 @@ void fwnode_remove_software_node(struct fwnode_handle *fwnode) - } - EXPORT_SYMBOL_GPL(fwnode_remove_software_node); - -+/** -+ * device_add_software_node - Assign software node to a device -+ * @dev: The device the software node is meant for. -+ * @swnode: The software node. -+ * -+ * This function will register @swnode and make it the secondary firmware node -+ * pointer of @dev. If @dev has no primary node, then @swnode will become the primary -+ * node. -+ */ -+int device_add_software_node(struct device *dev, const struct software_node *swnode) -+{ -+ int ret; -+ -+ /* Only one software node per device. */ -+ if (dev_to_swnode(dev)) -+ return -EBUSY; -+ -+ ret = software_node_register(swnode); -+ if (ret) -+ return ret; -+ -+ set_secondary_fwnode(dev, software_node_fwnode(swnode)); -+ -+ return 0; -+} -+EXPORT_SYMBOL_GPL(device_add_software_node); -+ -+/** -+ * device_remove_software_node - Remove device's software node -+ * @dev: The device with the software node. -+ * -+ * This function will unregister the software node of @dev. -+ */ -+void device_remove_software_node(struct device *dev) -+{ -+ struct swnode *swnode; -+ -+ swnode = dev_to_swnode(dev); -+ if (!swnode) -+ return; -+ -+ software_node_notify(dev, KOBJ_REMOVE); -+ set_secondary_fwnode(dev, NULL); -+ kobject_put(&swnode->kobj); -+} -+EXPORT_SYMBOL_GPL(device_remove_software_node); -+ - int software_node_notify(struct device *dev, unsigned long action) - { -- struct fwnode_handle *fwnode = dev_fwnode(dev); - struct swnode *swnode; - int ret; - -- if (!fwnode) -- return 0; -- -- if (!is_software_node(fwnode)) -- fwnode = fwnode->secondary; -- if (!is_software_node(fwnode)) -+ swnode = dev_to_swnode(dev); -+ if (!swnode) - return 0; - -- swnode = to_swnode(fwnode); -- - switch (action) { - case KOBJ_ADD: - ret = sysfs_create_link(&dev->kobj, &swnode->kobj, -diff --git a/include/linux/property.h b/include/linux/property.h -index 2d4542629d80b..3b6093f6bd04c 100644 ---- a/include/linux/property.h -+++ b/include/linux/property.h -@@ -485,4 +485,7 @@ fwnode_create_software_node(const struct property_entry *properties, - const struct fwnode_handle *parent); - void fwnode_remove_software_node(struct fwnode_handle *fwnode); - -+int device_add_software_node(struct device *dev, const struct software_node *swnode); -+void device_remove_software_node(struct device *dev); -+ - #endif /* _LINUX_PROPERTY_H_ */ --- -2.39.2 - diff --git a/queue-5.10/usb-dwc3-qcom-constify-the-software-node.patch b/queue-5.10/usb-dwc3-qcom-constify-the-software-node.patch deleted file mode 100644 index 1bf52811765..00000000000 --- a/queue-5.10/usb-dwc3-qcom-constify-the-software-node.patch +++ /dev/null @@ -1,71 +0,0 @@ -From dc547ccf99a61723e5321c95077dc9e40eeb205e Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 4 Feb 2021 17:17:09 +0300 -Subject: usb: dwc3: qcom: Constify the software node - -From: Heikki Krogerus - -[ Upstream commit 8dc6e6dd1bee39cd65a232a17d51240fc65a0f4a ] - -What platform_device_add_properties() does is it allocates -dynamically a software node that will contain the device -properties supplied to it, and then couples that node with -the device. If the properties are constant, the node can be -constant as well. - -Signed-off-by: Heikki Krogerus -Link: https://lore.kernel.org/r/20210204141711.53775-5-heikki.krogerus@linux.intel.com -Signed-off-by: Greg Kroah-Hartman -Stable-dep-of: 8fd95da2cfb5 ("usb: dwc3: qcom: Release the correct resources in dwc3_qcom_remove()") -Signed-off-by: Sasha Levin ---- - drivers/usb/dwc3/dwc3-qcom.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c -index 5c66efb05d7f7..d7222c8cb0060 100644 ---- a/drivers/usb/dwc3/dwc3-qcom.c -+++ b/drivers/usb/dwc3/dwc3-qcom.c -@@ -592,6 +592,10 @@ static const struct property_entry dwc3_qcom_acpi_properties[] = { - {} - }; - -+static const struct software_node dwc3_qcom_swnode = { -+ .properties = dwc3_qcom_acpi_properties, -+}; -+ - static int dwc3_qcom_acpi_register_core(struct platform_device *pdev) - { - struct dwc3_qcom *qcom = platform_get_drvdata(pdev); -@@ -642,16 +646,17 @@ static int dwc3_qcom_acpi_register_core(struct platform_device *pdev) - goto out; - } - -- ret = platform_device_add_properties(qcom->dwc3, -- dwc3_qcom_acpi_properties); -+ ret = device_add_software_node(&qcom->dwc3->dev, &dwc3_qcom_swnode); - if (ret < 0) { - dev_err(&pdev->dev, "failed to add properties\n"); - goto out; - } - - ret = platform_device_add(qcom->dwc3); -- if (ret) -+ if (ret) { - dev_err(&pdev->dev, "failed to add device\n"); -+ device_remove_software_node(&qcom->dwc3->dev); -+ } - - out: - kfree(child_res); -@@ -872,6 +877,7 @@ static int dwc3_qcom_remove(struct platform_device *pdev) - struct device *dev = &pdev->dev; - int i; - -+ device_remove_software_node(&qcom->dwc3->dev); - of_platform_depopulate(dev); - - for (i = qcom->num_clocks - 1; i >= 0; i--) { --- -2.39.2 - diff --git a/queue-5.10/usb-dwc3-qcom-fix-an-error-handling-path-in-dwc3_qco.patch b/queue-5.10/usb-dwc3-qcom-fix-an-error-handling-path-in-dwc3_qco.patch index be88773beaa..9a466e9d065 100644 --- a/queue-5.10/usb-dwc3-qcom-fix-an-error-handling-path-in-dwc3_qco.patch +++ b/queue-5.10/usb-dwc3-qcom-fix-an-error-handling-path-in-dwc3_qco.patch @@ -18,14 +18,12 @@ Message-ID: Signed-off-by: Sasha Levin --- - drivers/usb/dwc3/dwc3-qcom.c | 5 +++-- + drivers/usb/dwc3/dwc3-qcom.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c -index a699986b56c4b..7cfb2c016f99c 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c -@@ -791,9 +791,10 @@ static int dwc3_qcom_probe(struct platform_device *pdev) +@@ -786,9 +786,10 @@ static int dwc3_qcom_probe(struct platfo if (IS_ERR_OR_NULL(qcom->urs_usb)) { dev_err(dev, "failed to create URS USB platdev\n"); if (!qcom->urs_usb) @@ -38,6 +36,3 @@ index a699986b56c4b..7cfb2c016f99c 100644 } } } --- -2.39.2 - diff --git a/queue-5.10/usb-dwc3-qcom-release-the-correct-resources-in-dwc3_.patch b/queue-5.10/usb-dwc3-qcom-release-the-correct-resources-in-dwc3_.patch index 01a396d10c7..9972c7ef1c3 100644 --- a/queue-5.10/usb-dwc3-qcom-release-the-correct-resources-in-dwc3_.patch +++ b/queue-5.10/usb-dwc3-qcom-release-the-correct-resources-in-dwc3_.patch @@ -21,14 +21,12 @@ Message-ID: Signed-off-by: Sasha Levin --- - drivers/usb/dwc3/dwc3-qcom.c | 6 +++++- + drivers/usb/dwc3/dwc3-qcom.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c -index d7222c8cb0060..a699986b56c4b 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c -@@ -874,11 +874,15 @@ static int dwc3_qcom_probe(struct platform_device *pdev) +@@ -869,10 +869,14 @@ reset_assert: static int dwc3_qcom_remove(struct platform_device *pdev) { struct dwc3_qcom *qcom = platform_get_drvdata(pdev); @@ -36,7 +34,6 @@ index d7222c8cb0060..a699986b56c4b 100644 struct device *dev = &pdev->dev; int i; - device_remove_software_node(&qcom->dwc3->dev); - of_platform_depopulate(dev); + if (np) + of_platform_depopulate(&pdev->dev); @@ -45,6 +42,3 @@ index d7222c8cb0060..a699986b56c4b 100644 for (i = qcom->num_clocks - 1; i >= 0; i--) { clk_disable_unprepare(qcom->clks[i]); --- -2.39.2 - diff --git a/queue-5.4/series b/queue-5.4/series index b766c79ed9d..1ed16398317 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -135,8 +135,6 @@ usb-phy-phy-tahvo-fix-memory-leak-in-tahvo_usb_probe.patch usb-hide-unused-usbfs_notify_suspend-resume-function.patch mfd-rt5033-drop-rt5033-battery-sub-device.patch kvm-s390-fix-kvm_s390_get_cmma_bits-for-gfns-in-mems.patch -software-node-introduce-device_add_software_node.patch -usb-dwc3-qcom-constify-the-software-node.patch usb-dwc3-qcom-release-the-correct-resources-in-dwc3_.patch mfd-intel-lpss-add-missing-check-for-platform_get_re.patch serial-8250_omap-use-force_suspend-and-resume-for-sy.patch diff --git a/queue-5.4/software-node-introduce-device_add_software_node.patch b/queue-5.4/software-node-introduce-device_add_software_node.patch deleted file mode 100644 index 3b1aa38a18d..00000000000 --- a/queue-5.4/software-node-introduce-device_add_software_node.patch +++ /dev/null @@ -1,135 +0,0 @@ -From 77739841c2046e7a2820af8201754478ddbe4686 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 15 Jan 2021 12:49:11 +0300 -Subject: software node: Introduce device_add_software_node() - -From: Heikki Krogerus - -[ Upstream commit e68d0119e3284334de5650a1ac42ef4e179f895e ] - -This helper will register a software node and then assign -it to device at the same time. The function will also make -sure that the device can't have more than one software node. - -Acked-by: Felipe Balbi -Signed-off-by: Heikki Krogerus -Link: https://lore.kernel.org/r/20210115094914.88401-2-heikki.krogerus@linux.intel.com -Signed-off-by: Greg Kroah-Hartman -Stable-dep-of: 8fd95da2cfb5 ("usb: dwc3: qcom: Release the correct resources in dwc3_qcom_remove()") -Signed-off-by: Sasha Levin ---- - drivers/base/swnode.c | 71 +++++++++++++++++++++++++++++++++++----- - include/linux/property.h | 3 ++ - 2 files changed, 65 insertions(+), 9 deletions(-) - -diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c -index 4c3b9813b2843..4f9c6898e86e8 100644 ---- a/drivers/base/swnode.c -+++ b/drivers/base/swnode.c -@@ -48,6 +48,19 @@ EXPORT_SYMBOL_GPL(is_software_node); - struct swnode, fwnode) : NULL; \ - }) - -+static inline struct swnode *dev_to_swnode(struct device *dev) -+{ -+ struct fwnode_handle *fwnode = dev_fwnode(dev); -+ -+ if (!fwnode) -+ return NULL; -+ -+ if (!is_software_node(fwnode)) -+ fwnode = fwnode->secondary; -+ -+ return to_swnode(fwnode); -+} -+ - static struct swnode * - software_node_to_swnode(const struct software_node *node) - { -@@ -862,22 +875,62 @@ void fwnode_remove_software_node(struct fwnode_handle *fwnode) - } - EXPORT_SYMBOL_GPL(fwnode_remove_software_node); - -+/** -+ * device_add_software_node - Assign software node to a device -+ * @dev: The device the software node is meant for. -+ * @swnode: The software node. -+ * -+ * This function will register @swnode and make it the secondary firmware node -+ * pointer of @dev. If @dev has no primary node, then @swnode will become the primary -+ * node. -+ */ -+int device_add_software_node(struct device *dev, const struct software_node *swnode) -+{ -+ int ret; -+ -+ /* Only one software node per device. */ -+ if (dev_to_swnode(dev)) -+ return -EBUSY; -+ -+ ret = software_node_register(swnode); -+ if (ret) -+ return ret; -+ -+ set_secondary_fwnode(dev, software_node_fwnode(swnode)); -+ -+ return 0; -+} -+EXPORT_SYMBOL_GPL(device_add_software_node); -+ -+/** -+ * device_remove_software_node - Remove device's software node -+ * @dev: The device with the software node. -+ * -+ * This function will unregister the software node of @dev. -+ */ -+void device_remove_software_node(struct device *dev) -+{ -+ struct swnode *swnode; -+ -+ swnode = dev_to_swnode(dev); -+ if (!swnode) -+ return; -+ -+ software_node_notify(dev, KOBJ_REMOVE); -+ set_secondary_fwnode(dev, NULL); -+ kobject_put(&swnode->kobj); -+} -+EXPORT_SYMBOL_GPL(device_remove_software_node); -+ - int software_node_notify(struct device *dev, unsigned long action) - { -- struct fwnode_handle *fwnode = dev_fwnode(dev); - struct swnode *swnode; - int ret; - -- if (!fwnode) -- return 0; -- -- if (!is_software_node(fwnode)) -- fwnode = fwnode->secondary; -- if (!is_software_node(fwnode)) -+ swnode = dev_to_swnode(dev); -+ if (!swnode) - return 0; - -- swnode = to_swnode(fwnode); -- - switch (action) { - case KOBJ_ADD: - ret = sysfs_create_link(&dev->kobj, &swnode->kobj, -diff --git a/include/linux/property.h b/include/linux/property.h -index 9b3d4ca3a73a9..99fdafa20cd1d 100644 ---- a/include/linux/property.h -+++ b/include/linux/property.h -@@ -437,4 +437,7 @@ fwnode_create_software_node(const struct property_entry *properties, - const struct fwnode_handle *parent); - void fwnode_remove_software_node(struct fwnode_handle *fwnode); - -+int device_add_software_node(struct device *dev, const struct software_node *swnode); -+void device_remove_software_node(struct device *dev); -+ - #endif /* _LINUX_PROPERTY_H_ */ --- -2.39.2 - diff --git a/queue-5.4/usb-dwc3-qcom-constify-the-software-node.patch b/queue-5.4/usb-dwc3-qcom-constify-the-software-node.patch deleted file mode 100644 index cfb645929d8..00000000000 --- a/queue-5.4/usb-dwc3-qcom-constify-the-software-node.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 69665dbcb9e352a15bab2cf25306e6f1c7addaa4 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 4 Feb 2021 17:17:09 +0300 -Subject: usb: dwc3: qcom: Constify the software node - -From: Heikki Krogerus - -[ Upstream commit 8dc6e6dd1bee39cd65a232a17d51240fc65a0f4a ] - -What platform_device_add_properties() does is it allocates -dynamically a software node that will contain the device -properties supplied to it, and then couples that node with -the device. If the properties are constant, the node can be -constant as well. - -Signed-off-by: Heikki Krogerus -Link: https://lore.kernel.org/r/20210204141711.53775-5-heikki.krogerus@linux.intel.com -Signed-off-by: Greg Kroah-Hartman -Stable-dep-of: 8fd95da2cfb5 ("usb: dwc3: qcom: Release the correct resources in dwc3_qcom_remove()") -Signed-off-by: Sasha Levin ---- - drivers/usb/dwc3/dwc3-qcom.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c -index 7d3de23147fd5..3662565642120 100644 ---- a/drivers/usb/dwc3/dwc3-qcom.c -+++ b/drivers/usb/dwc3/dwc3-qcom.c -@@ -467,6 +467,10 @@ static const struct property_entry dwc3_qcom_acpi_properties[] = { - {} - }; - -+static const struct software_node dwc3_qcom_swnode = { -+ .properties = dwc3_qcom_acpi_properties, -+}; -+ - static int dwc3_qcom_acpi_register_core(struct platform_device *pdev) - { - struct dwc3_qcom *qcom = platform_get_drvdata(pdev); -@@ -511,16 +515,17 @@ static int dwc3_qcom_acpi_register_core(struct platform_device *pdev) - goto out; - } - -- ret = platform_device_add_properties(qcom->dwc3, -- dwc3_qcom_acpi_properties); -+ ret = device_add_software_node(&qcom->dwc3->dev, &dwc3_qcom_swnode); - if (ret < 0) { - dev_err(&pdev->dev, "failed to add properties\n"); - goto out; - } - - ret = platform_device_add(qcom->dwc3); -- if (ret) -+ if (ret) { - dev_err(&pdev->dev, "failed to add device\n"); -+ device_remove_software_node(&qcom->dwc3->dev); -+ } - - out: - kfree(child_res); -@@ -707,6 +712,7 @@ static int dwc3_qcom_remove(struct platform_device *pdev) - struct device *dev = &pdev->dev; - int i; - -+ device_remove_software_node(&qcom->dwc3->dev); - of_platform_depopulate(dev); - - for (i = qcom->num_clocks - 1; i >= 0; i--) { --- -2.39.2 - diff --git a/queue-5.4/usb-dwc3-qcom-release-the-correct-resources-in-dwc3_.patch b/queue-5.4/usb-dwc3-qcom-release-the-correct-resources-in-dwc3_.patch index 05bff2d39a0..3665d167362 100644 --- a/queue-5.4/usb-dwc3-qcom-release-the-correct-resources-in-dwc3_.patch +++ b/queue-5.4/usb-dwc3-qcom-release-the-correct-resources-in-dwc3_.patch @@ -21,14 +21,12 @@ Message-ID: Signed-off-by: Sasha Levin --- - drivers/usb/dwc3/dwc3-qcom.c | 6 +++++- + drivers/usb/dwc3/dwc3-qcom.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c -index 3662565642120..657ae26671d29 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c -@@ -709,11 +709,15 @@ static int dwc3_qcom_probe(struct platform_device *pdev) +@@ -704,10 +704,14 @@ reset_assert: static int dwc3_qcom_remove(struct platform_device *pdev) { struct dwc3_qcom *qcom = platform_get_drvdata(pdev); @@ -36,7 +34,6 @@ index 3662565642120..657ae26671d29 100644 struct device *dev = &pdev->dev; int i; - device_remove_software_node(&qcom->dwc3->dev); - of_platform_depopulate(dev); + if (np) + of_platform_depopulate(&pdev->dev); @@ -45,6 +42,3 @@ index 3662565642120..657ae26671d29 100644 for (i = qcom->num_clocks - 1; i >= 0; i--) { clk_disable_unprepare(qcom->clks[i]); --- -2.39.2 -