Re: [PATCH] mmc: dw_mmc: stop and complete DMA also in STATE_DATA_BUSY state
Ulf Hansson <[email protected]> Mon, 6 Jul 2026 17:46:25 +0200
| Newsgroups | org.kernel.vger.linux-mmc |
|---|---|
| Message-ID | <CAPx+jO9XhvuRLsq-92FB8uV+rwYUEXH-=4D=K36uMgjiFKYeRw@mail.gmail.com> |
On Wed, Jun 3, 2026 at 10:39 AM Marek Szyprowski <[email protected]> wrote: > > When transfer was stopped in STATE_DATA_BUSY state, there was no call to > dma_ops->cleanup function, so the DMA mapped buffer was never properly > unmapped. Fix this by calling dw_mci_stop_dma() function also in that > state to ensure proper cleanup call when DMA transfer was used. > > Signed-off-by: Marek Szyprowski <[email protected]> Applied for next, thanks! Please, let me know if you think there is reason to tag this for stable kernels too. Kind regards Uffe > --- > drivers/mmc/host/dw_mmc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c > index d734d010444d..cf5cecc5491d 100644 > --- a/drivers/mmc/host/dw_mmc.c > +++ b/drivers/mmc/host/dw_mmc.c > @@ -2057,6 +2057,7 @@ static void dw_mci_work_func(struct work_struct *t) > } > > dw_mci_stop_fault_timer(host); > + dw_mci_stop_dma(host); > host->data = NULL; > set_bit(EVENT_DATA_COMPLETE, &host->completed_events); > err = dw_mci_data_complete(host, data); > -- > 2.34.1 >