[RFC PATCH] mmc: tmio: disable dma_issue work before releasing DMA
Wolfram Sang
wsa+renesas at sang-engineering.com
Wed Nov 11 03:54:39 PST 2026
On Sun, Nov 01, 2026 at 02:37:39PM +0800, BeaCox wrote:
> tmio_mmc_host_remove() drains done and delayed_reset_work, but leaves
> dma_issue pending or running when it releases the DMA resources. Its
> backend callback accesses the host, controller registers and DMA state.
>
> Disable dma_issue synchronously before releasing DMA. This also rejects
> late queue attempts from an interrupt handler that is still running;
> cancel_work_sync() alone does not provide that guarantee.
>
> Some DMA backends fall back to PIO before initializing dma_issue. Move
> their work initialization ahead of the fallible setup so the work is
> always initialized when a DMA backend is present. Skip the disable call
> when no DMA backend is configured.
>
> The analysis, patch and validation were assisted by OpenAI Codex.
>
> Fixes: 85683fb39d9b ("mmc: sdhi: Convert from tasklet to BH workqueue")
> Cc: stable at vger.kernel.org
> Signed-off-by: BeaCox <0xbeac at gmail.com>
Real name, please.
More information about the linux-arm-kernel
mailing list