From: Greg Kroah-Hartman Date: Sat, 25 Sep 2021 11:51:27 +0000 (+0200) Subject: drop pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch X-Git-Tag: v4.4.285~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c3b130f7c1c457dab7aa517ad56c7c5202d585b8;p=thirdparty%2Fkernel%2Fstable-queue.git drop pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch From almost all queues, breaks the build :( --- diff --git a/queue-4.14/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch b/queue-4.14/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch deleted file mode 100644 index 27dae3ee6bd..00000000000 --- a/queue-4.14/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 020162d6f49f2963062229814a56a89c86cbeaa8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= -Date: Wed, 7 Jul 2021 18:27:50 +0200 -Subject: pwm: mxs: Don't modify HW state in .probe() after the PWM chip was registered -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Uwe Kleine-König - -commit 020162d6f49f2963062229814a56a89c86cbeaa8 upstream. - -This fixes a race condition: After pwmchip_add() is called there might -already be a consumer and then modifying the hardware behind the -consumer's back is bad. So reset before calling pwmchip_add(). - -Note that reseting the hardware isn't the right thing to do if the PWM -is already running as it might e.g. disable (or even enable) a backlight -that is supposed to be on (or off). - -Fixes: 4dce82c1e840 ("pwm: add pwm-mxs support") -Cc: Sascha Hauer -Cc: Shawn Guo -Signed-off-by: Uwe Kleine-König -Signed-off-by: Thierry Reding -Signed-off-by: Greg Kroah-Hartman ---- - drivers/pwm/pwm-mxs.c | 13 +++++-------- - 1 file changed, 5 insertions(+), 8 deletions(-) - ---- a/drivers/pwm/pwm-mxs.c -+++ b/drivers/pwm/pwm-mxs.c -@@ -158,6 +158,11 @@ static int mxs_pwm_probe(struct platform - return ret; - } - -+ /* FIXME: Only do this if the PWM isn't already running */ -+ ret = stmp_reset_block(mxs->base); -+ if (ret) -+ return dev_err_probe(&pdev->dev, ret, "failed to reset PWM\n"); -+ - ret = pwmchip_add(&mxs->chip); - if (ret < 0) { - dev_err(&pdev->dev, "failed to add pwm chip %d\n", ret); -@@ -166,15 +171,7 @@ static int mxs_pwm_probe(struct platform - - platform_set_drvdata(pdev, mxs); - -- ret = stmp_reset_block(mxs->base); -- if (ret) -- goto pwm_remove; -- - return 0; -- --pwm_remove: -- pwmchip_remove(&mxs->chip); -- return ret; - } - - static int mxs_pwm_remove(struct platform_device *pdev) diff --git a/queue-4.14/series b/queue-4.14/series index 9923b7551b6..e71c150c9f6 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -10,7 +10,6 @@ thermal-drivers-exynos-fix-an-error-code-in-exynos_tmu_probe.patch prctl-allow-to-setup-brk-for-et_dyn-executables.patch profiling-fix-shift-out-of-bounds-bugs.patch pwm-lpc32xx-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch -pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch kconfig.debug-drop-selecting-non-existing-hardlockup.patch parisc-move-pci_dev_is_behind_card_dino-to-where-it-.patch dmaengine-ioat-depends-on-uml.patch diff --git a/queue-4.19/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch b/queue-4.19/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch deleted file mode 100644 index b30cf904f70..00000000000 --- a/queue-4.19/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 020162d6f49f2963062229814a56a89c86cbeaa8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= -Date: Wed, 7 Jul 2021 18:27:50 +0200 -Subject: pwm: mxs: Don't modify HW state in .probe() after the PWM chip was registered -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Uwe Kleine-König - -commit 020162d6f49f2963062229814a56a89c86cbeaa8 upstream. - -This fixes a race condition: After pwmchip_add() is called there might -already be a consumer and then modifying the hardware behind the -consumer's back is bad. So reset before calling pwmchip_add(). - -Note that reseting the hardware isn't the right thing to do if the PWM -is already running as it might e.g. disable (or even enable) a backlight -that is supposed to be on (or off). - -Fixes: 4dce82c1e840 ("pwm: add pwm-mxs support") -Cc: Sascha Hauer -Cc: Shawn Guo -Signed-off-by: Uwe Kleine-König -Signed-off-by: Thierry Reding -Signed-off-by: Greg Kroah-Hartman ---- - drivers/pwm/pwm-mxs.c | 13 +++++-------- - 1 file changed, 5 insertions(+), 8 deletions(-) - ---- a/drivers/pwm/pwm-mxs.c -+++ b/drivers/pwm/pwm-mxs.c -@@ -152,6 +152,11 @@ static int mxs_pwm_probe(struct platform - return ret; - } - -+ /* FIXME: Only do this if the PWM isn't already running */ -+ ret = stmp_reset_block(mxs->base); -+ if (ret) -+ return dev_err_probe(&pdev->dev, ret, "failed to reset PWM\n"); -+ - ret = pwmchip_add(&mxs->chip); - if (ret < 0) { - dev_err(&pdev->dev, "failed to add pwm chip %d\n", ret); -@@ -160,15 +165,7 @@ static int mxs_pwm_probe(struct platform - - platform_set_drvdata(pdev, mxs); - -- ret = stmp_reset_block(mxs->base); -- if (ret) -- goto pwm_remove; -- - return 0; -- --pwm_remove: -- pwmchip_remove(&mxs->chip); -- return ret; - } - - static int mxs_pwm_remove(struct platform_device *pdev) diff --git a/queue-4.19/series b/queue-4.19/series index 91e6a6ef846..2c02a9326d4 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -13,7 +13,6 @@ prctl-allow-to-setup-brk-for-et_dyn-executables.patch nilfs2-use-refcount_dec_and_lock-to-fix-potential-uaf.patch profiling-fix-shift-out-of-bounds-bugs.patch pwm-lpc32xx-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch -pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch kconfig.debug-drop-selecting-non-existing-hardlockup.patch drivers-base-cacheinfo-get-rid-of-define_smp_call_ca.patch parisc-move-pci_dev_is_behind_card_dino-to-where-it-.patch diff --git a/queue-4.4/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch b/queue-4.4/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch deleted file mode 100644 index 27dae3ee6bd..00000000000 --- a/queue-4.4/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 020162d6f49f2963062229814a56a89c86cbeaa8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= -Date: Wed, 7 Jul 2021 18:27:50 +0200 -Subject: pwm: mxs: Don't modify HW state in .probe() after the PWM chip was registered -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Uwe Kleine-König - -commit 020162d6f49f2963062229814a56a89c86cbeaa8 upstream. - -This fixes a race condition: After pwmchip_add() is called there might -already be a consumer and then modifying the hardware behind the -consumer's back is bad. So reset before calling pwmchip_add(). - -Note that reseting the hardware isn't the right thing to do if the PWM -is already running as it might e.g. disable (or even enable) a backlight -that is supposed to be on (or off). - -Fixes: 4dce82c1e840 ("pwm: add pwm-mxs support") -Cc: Sascha Hauer -Cc: Shawn Guo -Signed-off-by: Uwe Kleine-König -Signed-off-by: Thierry Reding -Signed-off-by: Greg Kroah-Hartman ---- - drivers/pwm/pwm-mxs.c | 13 +++++-------- - 1 file changed, 5 insertions(+), 8 deletions(-) - ---- a/drivers/pwm/pwm-mxs.c -+++ b/drivers/pwm/pwm-mxs.c -@@ -158,6 +158,11 @@ static int mxs_pwm_probe(struct platform - return ret; - } - -+ /* FIXME: Only do this if the PWM isn't already running */ -+ ret = stmp_reset_block(mxs->base); -+ if (ret) -+ return dev_err_probe(&pdev->dev, ret, "failed to reset PWM\n"); -+ - ret = pwmchip_add(&mxs->chip); - if (ret < 0) { - dev_err(&pdev->dev, "failed to add pwm chip %d\n", ret); -@@ -166,15 +171,7 @@ static int mxs_pwm_probe(struct platform - - platform_set_drvdata(pdev, mxs); - -- ret = stmp_reset_block(mxs->base); -- if (ret) -- goto pwm_remove; -- - return 0; -- --pwm_remove: -- pwmchip_remove(&mxs->chip); -- return ret; - } - - static int mxs_pwm_remove(struct platform_device *pdev) diff --git a/queue-4.4/series b/queue-4.4/series index fe3f3d71bf2..5fbd79b41c5 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -6,7 +6,6 @@ thermal-drivers-exynos-fix-an-error-code-in-exynos_tmu_probe.patch 9p-trans_virtio-remove-sysfs-file-on-probe-failure.patch prctl-allow-to-setup-brk-for-et_dyn-executables.patch profiling-fix-shift-out-of-bounds-bugs.patch -pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch dmaengine-acpi-dma-check-for-64-bit-mmio-address.patch dmaengine-acpi-avoid-comparison-gsi-with-linux-virq.patch parisc-move-pci_dev_is_behind_card_dino-to-where-it-.patch diff --git a/queue-4.9/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch b/queue-4.9/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch deleted file mode 100644 index 27dae3ee6bd..00000000000 --- a/queue-4.9/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 020162d6f49f2963062229814a56a89c86cbeaa8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= -Date: Wed, 7 Jul 2021 18:27:50 +0200 -Subject: pwm: mxs: Don't modify HW state in .probe() after the PWM chip was registered -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Uwe Kleine-König - -commit 020162d6f49f2963062229814a56a89c86cbeaa8 upstream. - -This fixes a race condition: After pwmchip_add() is called there might -already be a consumer and then modifying the hardware behind the -consumer's back is bad. So reset before calling pwmchip_add(). - -Note that reseting the hardware isn't the right thing to do if the PWM -is already running as it might e.g. disable (or even enable) a backlight -that is supposed to be on (or off). - -Fixes: 4dce82c1e840 ("pwm: add pwm-mxs support") -Cc: Sascha Hauer -Cc: Shawn Guo -Signed-off-by: Uwe Kleine-König -Signed-off-by: Thierry Reding -Signed-off-by: Greg Kroah-Hartman ---- - drivers/pwm/pwm-mxs.c | 13 +++++-------- - 1 file changed, 5 insertions(+), 8 deletions(-) - ---- a/drivers/pwm/pwm-mxs.c -+++ b/drivers/pwm/pwm-mxs.c -@@ -158,6 +158,11 @@ static int mxs_pwm_probe(struct platform - return ret; - } - -+ /* FIXME: Only do this if the PWM isn't already running */ -+ ret = stmp_reset_block(mxs->base); -+ if (ret) -+ return dev_err_probe(&pdev->dev, ret, "failed to reset PWM\n"); -+ - ret = pwmchip_add(&mxs->chip); - if (ret < 0) { - dev_err(&pdev->dev, "failed to add pwm chip %d\n", ret); -@@ -166,15 +171,7 @@ static int mxs_pwm_probe(struct platform - - platform_set_drvdata(pdev, mxs); - -- ret = stmp_reset_block(mxs->base); -- if (ret) -- goto pwm_remove; -- - return 0; -- --pwm_remove: -- pwmchip_remove(&mxs->chip); -- return ret; - } - - static int mxs_pwm_remove(struct platform_device *pdev) diff --git a/queue-4.9/series b/queue-4.9/series index c6d64c42cdc..a945220412e 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -10,7 +10,6 @@ thermal-drivers-exynos-fix-an-error-code-in-exynos_tmu_probe.patch prctl-allow-to-setup-brk-for-et_dyn-executables.patch profiling-fix-shift-out-of-bounds-bugs.patch pwm-lpc32xx-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch -pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch parisc-move-pci_dev_is_behind_card_dino-to-where-it-.patch dmaengine-ioat-depends-on-uml.patch dmaengine-xilinx_dma-set-dma-mask-for-coherent-apis.patch diff --git a/queue-5.4/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch b/queue-5.4/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch deleted file mode 100644 index 036cceb19c0..00000000000 --- a/queue-5.4/pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 020162d6f49f2963062229814a56a89c86cbeaa8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= -Date: Wed, 7 Jul 2021 18:27:50 +0200 -Subject: pwm: mxs: Don't modify HW state in .probe() after the PWM chip was registered -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Uwe Kleine-König - -commit 020162d6f49f2963062229814a56a89c86cbeaa8 upstream. - -This fixes a race condition: After pwmchip_add() is called there might -already be a consumer and then modifying the hardware behind the -consumer's back is bad. So reset before calling pwmchip_add(). - -Note that reseting the hardware isn't the right thing to do if the PWM -is already running as it might e.g. disable (or even enable) a backlight -that is supposed to be on (or off). - -Fixes: 4dce82c1e840 ("pwm: add pwm-mxs support") -Cc: Sascha Hauer -Cc: Shawn Guo -Signed-off-by: Uwe Kleine-König -Signed-off-by: Thierry Reding -Signed-off-by: Greg Kroah-Hartman ---- - drivers/pwm/pwm-mxs.c | 13 +++++-------- - 1 file changed, 5 insertions(+), 8 deletions(-) - ---- a/drivers/pwm/pwm-mxs.c -+++ b/drivers/pwm/pwm-mxs.c -@@ -150,6 +150,11 @@ static int mxs_pwm_probe(struct platform - return ret; - } - -+ /* FIXME: Only do this if the PWM isn't already running */ -+ ret = stmp_reset_block(mxs->base); -+ if (ret) -+ return dev_err_probe(&pdev->dev, ret, "failed to reset PWM\n"); -+ - ret = pwmchip_add(&mxs->chip); - if (ret < 0) { - dev_err(&pdev->dev, "failed to add pwm chip %d\n", ret); -@@ -158,15 +163,7 @@ static int mxs_pwm_probe(struct platform - - platform_set_drvdata(pdev, mxs); - -- ret = stmp_reset_block(mxs->base); -- if (ret) -- goto pwm_remove; -- - return 0; -- --pwm_remove: -- pwmchip_remove(&mxs->chip); -- return ret; - } - - static int mxs_pwm_remove(struct platform_device *pdev) diff --git a/queue-5.4/series b/queue-5.4/series index 090398d34bb..ed92128b965 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -23,7 +23,6 @@ prctl-allow-to-setup-brk-for-et_dyn-executables.patch nilfs2-use-refcount_dec_and_lock-to-fix-potential-uaf.patch profiling-fix-shift-out-of-bounds-bugs.patch pwm-lpc32xx-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch -pwm-mxs-don-t-modify-hw-state-in-.probe-after-the-pwm-chip-was-registered.patch phy-avoid-unnecessary-link-up-delay-in-polling-mode.patch net-stmmac-reset-tx-desc-base-address-before-restarting-tx.patch kconfig.debug-drop-selecting-non-existing-hardlockup.patch