soc: ti: knav_qmss_queue: Implement resource cleanup in remove()
PATCH v2 1/1 soc: ti: knav_qmss_queue: Implement resource cleanup in remove()
Implement the TODO in knav_queue_remove() by stopping PDSPs and freeing queue regions and queue ranges before disabling runtime PM, mirroring the cleanup performed in the probe error path.
Set device_ready to false before cleanup to prevent any further use of the device during teardown.
This ensures resources are released on driver unbind and avoids leaking queue/region state.
--- drivers/soc/ti/knav_qmss_queue.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/soc/ti/knav_qmss_queue.c +6 -1
@@ -1873,7 +1873,12 @@ static int knav_queue_probe(struct platform_device *pdev)static void knav_queue_remove (struct platform_device *pdev) { -/* TODO: Free resources */ +struct knav_device *kdev =platform_get_drvdata (pdev); + + device_ready = false; +knav_queue_stop_pdsps (kdev); +knav_queue_free_regions (kdev); +knav_free_queue_ranges (kdev);pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev); }
Signature · 1 line
2.54.0.windows.1
Hi Nishanth,
Gentle ping on this patch. You suggested this fix — the patch implements exactly what was discussed: stopping PDSPs and freeing queue regions and queue ranges before disabling runtime PM, mirroring the cleanup already done in the probe error path, and setting device_ready to false before teardown.
Could you take a look and provide an Acked-by if it looks correct?
The patch has been waiting since November 2025 across several versions with no reviewer feedback.
Thanks,
Shofiq
Nishanth Menon
maintainerQuoted 8 lines · Md Shofiqul Islam
Hi Nishanth,
Gentle ping on this patch. You suggested this fix — the patch implements exactly what was discussed: stopping PDSPs and freeing queue regions and queue ranges before disabling runtime PM, mirroring the cleanup already done in the probe error path, and setting
device_readyto false before teardown.
Quoted 6 lines
Could you take a look and provide an Acked-by if it looks correct?
The patch has been waiting since November 2025 across several versions with no reviewer feedback.
Usually the latest version of the patch does need a few days of soaking in mailing list before being picked up. I was going to do that later today.
Signature · 4 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D https://ti.com/opensource
Hi Md Shofiqul Islam,
Quoted 8 lines · Md Shofiqul Islam
Implement the TODO in
knav_queue_remove()by stopping PDSPs and freeing queue regions and queue ranges before disabling runtime PM, mirroring the cleanup performed in the probe error path.Set
device_readyto false before cleanup to prevent any further use of the device during teardown.[...]
I have applied the following to branch ti-drivers-soc-next on [1].
Thank you!
[1/1] soc: ti: knav_qmss_queue: Implement resource cleanup in remove()
commit: 10a1969353b20caa50c320717e054601631c0d3e
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
Signature · 4 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D https://ti.com/opensource