summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/parse_data_structs.py
diff options
context:
space:
mode:
authorLinus Walleij <linusw@kernel.org>2026-09-27 11:03:20 +0200
committerVinod Koul <vkoul@kernel.org>2026-10-05 17:37:45 +0200
commit55a35231b8ced2250a7743ec350a9566d553780e (patch)
tree2e1b30acf0340b11583de99c32d2149ad5a9e27f /tools/lib/python/kdoc/parse_data_structs.py
parent12787e3f2f93f3af59769b08ee4fcb044531120b (diff)
dmaengine: ste_dma40: Handle runtime PM resume errors
Several channel operations use pm_runtime_get_sync() and access DMA40 registers without checking whether runtime resume succeeded. If resume fails, the registers may be inaccessible. pm_runtime_get_sync() also increments the usage counter on failure, making error unwinding easy to unbalance. Use pm_runtime_resume_and_get() and avoid register access when resume fails. Acquire the runtime PM reference before allocating a channel so failure needs no channel-allocation rollback. If a queued transfer cannot be started because resume failed, retire all issued descriptors through the normal tasklet path. Since dma_async_issue_pending() cannot return an error, leaving them queued would make clients wait indefinitely for callbacks. Termination and channel release must also clean up software state when the controller cannot resume. d40_term_all() only releases descriptor state and does not access DMA40 registers, so it remains unconditional. Balance each transient runtime PM reference in its successful acquisition block, without bookkeeping flags. Release the outstanding busy reference and channel allocation state when freeing a channel. Skip only the hardware stop that requires register access. Fixes: 7fb3e75e1833 ("dmaengine/ste_dma40: support pm in dma40") Assisted-by: LLM Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260927-dma40-fixes-v7-7-89f595e8851d@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions