From: sashiko-bot@kernel.org
To: "Joshua Crofts" <crofts@kernel.org>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: omap-sham: remove redundant pm_runtime_dont_use_autosuspend() calls
Date: Sat, 07 Nov 2026 12:56:30 +0000 [thread overview]
Message-ID: <sashiko-outbox-202899@kernel.org> (raw)
In-Reply-To: <20261107-crypto-dont-use-autosuspend-removal-v1-1-62696ad3ff0e@kernel.org>
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
next prev parent reply other threads:[~2026-11-07 12:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-11-08 12:11 ` Joshua Crofts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-202899@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=crofts@kernel.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.