All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] spi: use proper DMAENGINE API for termination
@ 2021-06-23  9:58 Wolfram Sang
  2021-06-23  9:58 ` [PATCH 1/2] spi: spi-rspi: : " Wolfram Sang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Wolfram Sang @ 2021-06-23  9:58 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-renesas-soc, Wolfram Sang, linux-kernel, linux-spi

dmaengine_terminate_all() is deprecated in favor of explicitly saying if
it should be sync or async. Update the drivers I audited.


Wolfram Sang (2):
  spi: spi-rspi: : use proper DMAENGINE API for termination
  spi: spi-sh-msiof: : use proper DMAENGINE API for termination

 drivers/spi/spi-rspi.c     | 6 +++---
 drivers/spi/spi-sh-msiof.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] spi: spi-rspi: : use proper DMAENGINE API for termination
  2021-06-23  9:58 [PATCH 0/2] spi: use proper DMAENGINE API for termination Wolfram Sang
@ 2021-06-23  9:58 ` Wolfram Sang
  2021-06-23  9:58 ` [PATCH 2/2] spi: spi-sh-msiof: " Wolfram Sang
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2021-06-23  9:58 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-renesas-soc, Wolfram Sang, Mark Brown, linux-spi, 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/spi/spi-rspi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
index e39fd38f5180..d16ed88802d3 100644
--- a/drivers/spi/spi-rspi.c
+++ b/drivers/spi/spi-rspi.c
@@ -618,9 +618,9 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
 			ret = -ETIMEDOUT;
 		}
 		if (tx)
-			dmaengine_terminate_all(rspi->ctlr->dma_tx);
+			dmaengine_terminate_sync(rspi->ctlr->dma_tx);
 		if (rx)
-			dmaengine_terminate_all(rspi->ctlr->dma_rx);
+			dmaengine_terminate_sync(rspi->ctlr->dma_rx);
 	}
 
 	rspi_disable_irq(rspi, irq_mask);
@@ -634,7 +634,7 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
 
 no_dma_tx:
 	if (rx)
-		dmaengine_terminate_all(rspi->ctlr->dma_rx);
+		dmaengine_terminate_sync(rspi->ctlr->dma_rx);
 no_dma_rx:
 	if (ret == -EAGAIN) {
 		dev_warn_once(&rspi->ctlr->dev,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] spi: spi-sh-msiof: : use proper DMAENGINE API for termination
  2021-06-23  9:58 [PATCH 0/2] spi: use proper DMAENGINE API for termination Wolfram Sang
  2021-06-23  9:58 ` [PATCH 1/2] spi: spi-rspi: : " Wolfram Sang
@ 2021-06-23  9:58 ` Wolfram Sang
  2021-06-23 10:02 ` [PATCH 0/2] spi: " Wolfram Sang
  2021-06-23 16:08 ` Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2021-06-23  9:58 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-renesas-soc, Wolfram Sang, Mark Brown, linux-spi, 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/spi/spi-sh-msiof.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
index 41ed9ff8fad0..f88d9acd20d9 100644
--- a/drivers/spi/spi-sh-msiof.c
+++ b/drivers/spi/spi-sh-msiof.c
@@ -853,10 +853,10 @@ static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
 	sh_msiof_spi_stop(p, rx);
 stop_dma:
 	if (tx)
-		dmaengine_terminate_all(p->ctlr->dma_tx);
+		dmaengine_terminate_sync(p->ctlr->dma_tx);
 no_dma_tx:
 	if (rx)
-		dmaengine_terminate_all(p->ctlr->dma_rx);
+		dmaengine_terminate_sync(p->ctlr->dma_rx);
 	sh_msiof_write(p, SIIER, 0);
 	return ret;
 }
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] spi: use proper DMAENGINE API for termination
  2021-06-23  9:58 [PATCH 0/2] spi: use proper DMAENGINE API for termination Wolfram Sang
  2021-06-23  9:58 ` [PATCH 1/2] spi: spi-rspi: : " Wolfram Sang
  2021-06-23  9:58 ` [PATCH 2/2] spi: spi-sh-msiof: " Wolfram Sang
@ 2021-06-23 10:02 ` Wolfram Sang
  2021-06-23 16:08 ` Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2021-06-23 10:02 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-renesas-soc, linux-kernel, linux-spi

[-- Attachment #1: Type: text/plain, Size: 279 bytes --]

On Wed, Jun 23, 2021 at 11:58:41AM +0200, Wolfram Sang wrote:
> dmaengine_terminate_all() is deprecated in favor of explicitly saying if
> it should be sync or async. Update the drivers I audited.

I am very sorry to have sent the SPI and I2C patches to the MMC list as
well :(


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] spi: use proper DMAENGINE API for termination
  2021-06-23  9:58 [PATCH 0/2] spi: use proper DMAENGINE API for termination Wolfram Sang
                   ` (2 preceding siblings ...)
  2021-06-23 10:02 ` [PATCH 0/2] spi: " Wolfram Sang
@ 2021-06-23 16:08 ` Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2021-06-23 16:08 UTC (permalink / raw)
  To: Wolfram Sang, linux-mmc
  Cc: Mark Brown, linux-renesas-soc, linux-kernel, linux-spi

On Wed, 23 Jun 2021 11:58:41 +0200, Wolfram Sang 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 (2):
>   spi: spi-rspi: : use proper DMAENGINE API for termination
>   spi: spi-sh-msiof: : use proper DMAENGINE API for termination
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/2] spi: spi-rspi: : use proper DMAENGINE API for termination
      commit: 29176edd6e7ad7333d0bb19a309b2104fa4f4341
[2/2] spi: spi-sh-msiof: : use proper DMAENGINE API for termination
      commit: a26dee29ec04a3f6779684852c36a2a71fd68fd8

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a 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.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-23 16:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23  9:58 [PATCH 0/2] spi: use proper DMAENGINE API for termination Wolfram Sang
2021-06-23  9:58 ` [PATCH 1/2] spi: spi-rspi: : " Wolfram Sang
2021-06-23  9:58 ` [PATCH 2/2] spi: spi-sh-msiof: " Wolfram Sang
2021-06-23 10:02 ` [PATCH 0/2] spi: " Wolfram Sang
2021-06-23 16:08 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.