* [PATCH 1/3] mmc: renesas_sdhi_sys_dmac: : use proper DMAENGINE API for termination
2021-06-23 9:57 [PATCH 0/3] mmc: use proper DMAENGINE API for termination Wolfram Sang
@ 2021-06-23 9:57 ` Wolfram Sang
2021-06-23 9:57 ` [PATCH 2/3] mmc: sh_mmcif: " Wolfram Sang
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2021-06-23 9:57 UTC (permalink / raw)
To: linux-mmc; +Cc: linux-renesas-soc, Wolfram Sang, Ulf Hansson, linux-kernel
dmaengine_terminate_all() is deprecated in favor of explicitly saying if
it should be sync or async. Here, we want dmaengine_terminate_sync()
because there is no other synchronization code in the driver to handle
an async case.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/mmc/host/renesas_sdhi_sys_dmac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/renesas_sdhi_sys_dmac.c b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
index ffa64211f4de..6956b83469c8 100644
--- a/drivers/mmc/host/renesas_sdhi_sys_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_sys_dmac.c
@@ -108,9 +108,9 @@ static void renesas_sdhi_sys_dmac_abort_dma(struct tmio_mmc_host *host)
renesas_sdhi_sys_dmac_enable_dma(host, false);
if (host->chan_rx)
- dmaengine_terminate_all(host->chan_rx);
+ dmaengine_terminate_sync(host->chan_rx);
if (host->chan_tx)
- dmaengine_terminate_all(host->chan_tx);
+ dmaengine_terminate_sync(host->chan_tx);
renesas_sdhi_sys_dmac_enable_dma(host, true);
}
--
2.30.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] mmc: sh_mmcif: : use proper DMAENGINE API for termination
2021-06-23 9:57 [PATCH 0/3] mmc: use proper DMAENGINE API for termination Wolfram Sang
2021-06-23 9:57 ` [PATCH 1/3] mmc: renesas_sdhi_sys_dmac: : " Wolfram Sang
@ 2021-06-23 9:57 ` Wolfram Sang
2021-06-23 13:55 ` Geert Uytterhoeven
2021-06-23 9:57 ` [PATCH 3/3] mmc: usdhi6rol0: " Wolfram Sang
2021-06-29 15:09 ` [PATCH 0/3] mmc: " Ulf Hansson
3 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2021-06-23 9:57 UTC (permalink / raw)
To: linux-mmc; +Cc: linux-renesas-soc, Wolfram Sang, Ulf Hansson, linux-kernel
dmaengine_terminate_all() is deprecated in favor of explicitly saying if
it should be sync or async. Here, we want dmaengine_terminate_sync()
because there is no other synchronization code in the driver to handle
an async case.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/mmc/host/sh_mmcif.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index e5e457037235..bcc595c70a9f 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1164,9 +1164,9 @@ static bool sh_mmcif_end_cmd(struct sh_mmcif_host *host)
data->bytes_xfered = 0;
/* Abort DMA */
if (data->flags & MMC_DATA_READ)
- dmaengine_terminate_all(host->chan_rx);
+ dmaengine_terminate_sync(host->chan_rx);
else
- dmaengine_terminate_all(host->chan_tx);
+ dmaengine_terminate_sync(host->chan_tx);
}
return false;
--
2.30.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] mmc: sh_mmcif: : use proper DMAENGINE API for termination
2021-06-23 9:57 ` [PATCH 2/3] mmc: sh_mmcif: " Wolfram Sang
@ 2021-06-23 13:55 ` Geert Uytterhoeven
0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2021-06-23 13:55 UTC (permalink / raw)
To: Wolfram Sang
Cc: Linux MMC List, Linux-Renesas, Ulf Hansson, Linux Kernel Mailing List
Hi Wolfram,
On Wed, Jun 23, 2021 at 11:57 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> dmaengine_terminate_all() is deprecated in favor of explicitly saying if
> it should be sync or async. Here, we want dmaengine_terminate_sync()
> because there is no other synchronization code in the driver to handle
> an async case.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Looks OK, as this driver uses a threaded irq handler.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Have you tried triggering DMA termination, with lockdep enabled?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] mmc: usdhi6rol0: : use proper DMAENGINE API for termination
2021-06-23 9:57 [PATCH 0/3] mmc: use proper DMAENGINE API for termination Wolfram Sang
2021-06-23 9:57 ` [PATCH 1/3] mmc: renesas_sdhi_sys_dmac: : " Wolfram Sang
2021-06-23 9:57 ` [PATCH 2/3] mmc: sh_mmcif: " Wolfram Sang
@ 2021-06-23 9:57 ` Wolfram Sang
2021-06-23 13:56 ` Geert Uytterhoeven
2021-06-29 15:09 ` [PATCH 0/3] mmc: " Ulf Hansson
3 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2021-06-23 9:57 UTC (permalink / raw)
To: linux-mmc
Cc: linux-renesas-soc, Wolfram Sang, Jesper Nilsson, Lars Persson,
Ulf Hansson, linux-arm-kernel, linux-kernel
dmaengine_terminate_all() is deprecated in favor of explicitly saying if
it should be sync or async. Here, we want dmaengine_terminate_sync()
because there is no other synchronization code in the driver to handle
an async case.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/mmc/host/usdhi6rol0.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
index 615f3d008af1..8cfbb244a4ae 100644
--- a/drivers/mmc/host/usdhi6rol0.c
+++ b/drivers/mmc/host/usdhi6rol0.c
@@ -631,9 +631,9 @@ static void usdhi6_dma_kill(struct usdhi6_host *host)
__func__, data->sg_len, data->blocks, data->blksz);
/* Abort DMA */
if (data->flags & MMC_DATA_READ)
- dmaengine_terminate_all(host->chan_rx);
+ dmaengine_terminate_sync(host->chan_rx);
else
- dmaengine_terminate_all(host->chan_tx);
+ dmaengine_terminate_sync(host->chan_tx);
}
static void usdhi6_dma_check_error(struct usdhi6_host *host)
--
2.30.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] mmc: usdhi6rol0: : use proper DMAENGINE API for termination
2021-06-23 9:57 ` [PATCH 3/3] mmc: usdhi6rol0: " Wolfram Sang
@ 2021-06-23 13:56 ` Geert Uytterhoeven
0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2021-06-23 13:56 UTC (permalink / raw)
To: Wolfram Sang
Cc: Linux MMC List, Linux-Renesas, Jesper Nilsson, Lars Persson,
Ulf Hansson, linux-arm-kernel, Linux Kernel Mailing List
On Wed, Jun 23, 2021 at 11:58 AM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> dmaengine_terminate_all() is deprecated in favor of explicitly saying if
> it should be sync or async. Here, we want dmaengine_terminate_sync()
> because there is no other synchronization code in the driver to handle
> an async case.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Looks OK, as this driver uses a threaded irq handler.
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Have you tried triggering DMA termination, with lockdep enabled?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] mmc: use proper DMAENGINE API for termination
2021-06-23 9:57 [PATCH 0/3] mmc: use proper DMAENGINE API for termination Wolfram Sang
` (2 preceding siblings ...)
2021-06-23 9:57 ` [PATCH 3/3] mmc: usdhi6rol0: " Wolfram Sang
@ 2021-06-29 15:09 ` Ulf Hansson
3 siblings, 0 replies; 7+ messages in thread
From: Ulf Hansson @ 2021-06-29 15:09 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-mmc, Linux-Renesas, linux-arm-kernel, Linux Kernel Mailing List
On Wed, 23 Jun 2021 at 11:57, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> dmaengine_terminate_all() is deprecated in favor of explicitly saying if
> it should be sync or async. Update the drivers I audited.
>
>
> Wolfram Sang (3):
> mmc: renesas_sdhi_sys_dmac: : use proper DMAENGINE API for termination
> mmc: sh_mmcif: : use proper DMAENGINE API for termination
> mmc: usdhi6rol0: : use proper DMAENGINE API for termination
>
> drivers/mmc/host/renesas_sdhi_sys_dmac.c | 4 ++--
> drivers/mmc/host/sh_mmcif.c | 4 ++--
> drivers/mmc/host/usdhi6rol0.c | 4 ++--
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
Queued up for v5.15 (temporary on the devel branch), thanks!
Kind regards
Uffe
^ permalink raw reply [flat|nested] 7+ messages in thread