Skip to content

hwrng: mtk - runtime PM fixes

Gu Bin linux-crypto lkml 2 versions New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v11 patch 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2hwrng: mtk - use pm_runtime_resume_and_get() in mtk_rng_read()drivers/char/hw_random/mtk-rng.c+3 -10 replies
2/2hwrng: mtk - enable runtime PM before registering the RNGdrivers/char/hw_random/mtk-rng.c+7 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] hwrng: mtk - runtime PM fixes

The sashiko review of v1 pointed out a pre-existing ordering problem:
mtk_rng_probe() registers the RNG before enabling runtime PM, so mtk_rng_read() can run while runtime PM is disabled - both in the probe window (hwrng_register() starts the fillfn kthread right away) and on unbind (the devres teardown disables runtime PM before the RNG is unregistered). Patch 2 moves the drvdata assignment and the runtime PM setup above the registration, which closes both windows. Patch 1 is unchanged.

Gu Bin (2):
hwrng: mtk - use pm_runtime_resume_and_get() in mtk_rng_read()
hwrng: mtk - enable runtime PM before registering the RNG

 drivers/char/hw_random/mtk-rng.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
Signature · 1 line
2.55.0.windows.3