lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1473754625-7268-1-git-send-email-fabien.lahoudere@collabora.co.uk>
Date:   Tue, 13 Sep 2016 10:17:05 +0200
From:   Fabien Lahoudere <fabien.lahoudere@...labora.co.uk>
To:     gregkh@...uxfoundation.org
Cc:     linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
        Fabien Lahoudere <fabien.lahoudere@...labora.co.uk>
Subject: [PATCH 1/1] serial: imx: Replace dmaengine old API

dmaengine_terminate_all() is deprecated and should be replaced by
dmaengine_terminate_sync() in non-atomic context or dmaengine_terminate_async()
with dmaengine_synchronize().

See commit b36f09c3c441 ("dmaengine: Add transfer termination synchronization support")

Signed-off-by: Fabien Lahoudere <fabien.lahoudere@...labora.co.uk>
---
 drivers/tty/serial/imx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index d9a0c87..1ae3c0c 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1122,7 +1122,7 @@ static void imx_setup_ufcr(struct imx_port *sport,
 static void imx_uart_dma_exit(struct imx_port *sport)
 {
 	if (sport->dma_chan_rx) {
-		dmaengine_terminate_all(sport->dma_chan_rx);
+		dmaengine_terminate_sync(sport->dma_chan_rx);
 		dma_release_channel(sport->dma_chan_rx);
 		sport->dma_chan_rx = NULL;
 		sport->rx_cookie = -EINVAL;
@@ -1131,7 +1131,7 @@ static void imx_uart_dma_exit(struct imx_port *sport)
 	}
 
 	if (sport->dma_chan_tx) {
-		dmaengine_terminate_all(sport->dma_chan_tx);
+		dmaengine_terminate_sync(sport->dma_chan_tx);
 		dma_release_channel(sport->dma_chan_tx);
 		sport->dma_chan_tx = NULL;
 	}
@@ -1351,8 +1351,8 @@ static void imx_shutdown(struct uart_port *port)
 	if (sport->dma_is_enabled) {
 		sport->dma_is_rxing = 0;
 		sport->dma_is_txing = 0;
-		dmaengine_terminate_all(sport->dma_chan_tx);
-		dmaengine_terminate_all(sport->dma_chan_rx);
+		dmaengine_terminate_sync(sport->dma_chan_tx);
+		dmaengine_terminate_sync(sport->dma_chan_rx);
 
 		spin_lock_irqsave(&sport->port.lock, flags);
 		imx_stop_tx(port);
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ