* [PATCH] crypto: omap-sham: remove redundant pm_runtime_dont_use_autosuspend() calls
@ 2026-11-07 12:39 Joshua Crofts
2026-11-07 12:56 ` sashiko-bot
2026-11-08 12:11 ` Joshua Crofts
0 siblings, 2 replies; 3+ messages in thread
From: Joshua Crofts @ 2026-11-07 12:39 UTC (permalink / raw)
To: Herbert Xu, David S. Miller; +Cc: linux-crypto, linux-kernel, Joshua Crofts
Since commit d1706f9da9f4 ("PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit()"),
driver core is now responsible for undoing any
pm_runtime_use_autosuspend() calls on driver exit.
Remove the redundant function calls.
Signed-off-by: Joshua Crofts <crofts@kernel.org>
---
drivers/crypto/omap-sham.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 5e739415a010..72182f190084 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -2109,7 +2109,6 @@ static int omap_sham_probe(struct platform_device *pdev)
list_del(&dd->list);
spin_unlock_bh(&sham.lock);
err_pm:
- pm_runtime_dont_use_autosuspend(dev);
pm_runtime_disable(dev);
if (!dd->polling_mode)
dma_release_channel(dd->dma_lch);
@@ -2131,7 +2130,6 @@ static void omap_sham_remove(struct platform_device *pdev)
omap_sham_unregister_algs(dd->pdata);
crypto_engine_exit(dd->engine);
cancel_work_sync(&dd->done_task);
- pm_runtime_dont_use_autosuspend(&pdev->dev);
pm_runtime_disable(&pdev->dev);
if (!dd->polling_mode)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261107-crypto-dont-use-autosuspend-removal-32f8d54397b6
Best regards,
--
Joshua Crofts
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: omap-sham: remove redundant pm_runtime_dont_use_autosuspend() calls
2026-11-07 12:39 [PATCH] crypto: omap-sham: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
@ 2026-11-07 12:56 ` sashiko-bot
2026-11-08 12:11 ` Joshua Crofts
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-07 12:56 UTC (permalink / raw)
To: Joshua Crofts, Herbert Xu, David S. Miller; +Cc: linux-crypto
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] crypto: omap-sham: missing runtime suspend before
pm_runtime_disable()
--
commit 3e6145ea4d9da519423f99c72ef5ab8b8512ee57
Author: Joshua Crofts <crofts@kernel.org>
crypto: omap-sham: remove redundant pm_runtime_dont_use_autosuspend() calls
This commit removes the pm_runtime_dont_use_autosuspend() calls from the
probe error path and driver remove callback in omap-sham.
> diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
> index 5e739415a0102..72182f1900849 100644
> --- a/drivers/crypto/omap-sham.c
> +++ b/drivers/crypto/omap-sham.c
> @@ -2109,7 +2109,6 @@ static int omap_sham_probe(struct platform_device *pdev)
> list_del(&dd->list);
> spin_unlock_bh(&sham.lock);
> err_pm:
> - pm_runtime_dont_use_autosuspend(dev);
> pm_runtime_disable(dev);
> if (!dd->polling_mode)
> dma_release_channel(dd->dma_lch);
> @@ -2131,7 +2130,6 @@ static void omap_sham_remove(struct platform_device *pdev)
> omap_sham_unregister_algs(dd->pdata);
> crypto_engine_exit(dd->engine);
> cancel_work_sync(&dd->done_task);
> - pm_runtime_dont_use_autosuspend(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
>
> if (!dd->polling_mode)
[Severity: High]
Does removing pm_runtime_dont_use_autosuspend() before pm_runtime_disable()
prevent .runtime_suspend from running on probe failure and driver removal?
Because autosuspend is enabled with a 1000 ms delay, pm_runtime_put_sync()
in omap_sham_probe() and in __device_release_driver() before
omap_sham_remove() only arms the autosuspend timer and leaves the device in
RPM_ACTIVE. Previously, calling pm_runtime_dont_use_autosuspend() while
runtime PM was still enabled triggered a synchronous rpm_idle() ->
rpm_suspend() transition before pm_runtime_disable().
Without it, pm_runtime_disable() cancels the pending autosuspend timer and
disables runtime PM while the device is still active. When
pm_runtime_reinit() later runs in device_unbind_cleanup(), runtime PM is
already disabled, so it only resets the software status to RPM_SUSPENDED via
pm_runtime_set_suspended() without invoking .runtime_suspend. This leaves
hardware clocks and the power domain enabled, and on OMAP2/OMAP3 platforms
using omap_device_pm_domain, probe failure leaves od->_state at
OMAP_DEVICE_STATE_ENABLED while runtime_status is RPM_SUSPENDED, causing any
subsequent probe to fail with -EINVAL in omap_device_enable().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261107-crypto-dont-use-autosuspend-removal-v1-1-62696ad3ff0e@kernel.org?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] crypto: omap-sham: remove redundant pm_runtime_dont_use_autosuspend() calls
2026-11-07 12:39 [PATCH] crypto: omap-sham: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
2026-11-07 12:56 ` sashiko-bot
@ 2026-11-08 12:11 ` Joshua Crofts
1 sibling, 0 replies; 3+ messages in thread
From: Joshua Crofts @ 2026-11-08 12:11 UTC (permalink / raw)
To: Herbert Xu, David S. Miller; +Cc: linux-crypto, linux-kernel
On Sat, 07 Nov 2026 13:39:43 +0100
Joshua Crofts <crofts@kernel.org> wrote:
> Since commit d1706f9da9f4 ("PM: runtime: call pm_runtime_dont_use_autosuspend() on reinit()"),
> driver core is now responsible for undoing any
> pm_runtime_use_autosuspend() calls on driver exit.
>
> Remove the redundant function calls.
>
> Signed-off-by: Joshua Crofts <crofts@kernel.org>
> ---
> drivers/crypto/omap-sham.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
> index 5e739415a010..72182f190084 100644
> --- a/drivers/crypto/omap-sham.c
> +++ b/drivers/crypto/omap-sham.c
> @@ -2109,7 +2109,6 @@ static int omap_sham_probe(struct platform_device *pdev)
> list_del(&dd->list);
> spin_unlock_bh(&sham.lock);
> err_pm:
> - pm_runtime_dont_use_autosuspend(dev);
> pm_runtime_disable(dev);
> if (!dd->polling_mode)
> dma_release_channel(dd->dma_lch);
> @@ -2131,7 +2130,6 @@ static void omap_sham_remove(struct platform_device *pdev)
> omap_sham_unregister_algs(dd->pdata);
> crypto_engine_exit(dd->engine);
> cancel_work_sync(&dd->done_task);
> - pm_runtime_dont_use_autosuspend(&pdev->dev);
Okay, drop this patch for the time being - the dont_use_autosuspend() ensures
that the .runtime_suspend callback is executed.
Thanks.
--
Kind regards,
Joshua Crofts
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-08 12:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-07 12:39 [PATCH] crypto: omap-sham: remove redundant pm_runtime_dont_use_autosuspend() calls Joshua Crofts
2026-11-07 12:56 ` sashiko-bot
2026-11-08 12:11 ` Joshua Crofts
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox