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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1231245441-9188-1-git-send-email-haavard.skinnemoen@atmel.com>
Date:	Tue,  6 Jan 2009 13:37:21 +0100
From:	Haavard Skinnemoen <haavard.skinnemoen@...el.com>
To:	akpm@...ux-foundation.org
Cc:	linux-kernel@...r.kernel.org,
	"Andrew Victor" <avictor.za@...il.com>,
	Itai Levi <itai.levi.devel@...il.com>,
	Haavard Skinnemoen <haavard.skinnemoen@...el.com>
Subject: [PATCH] atmel_serial: Fix flow control bug

From: Itai Levi <itai.levi.devel@...il.com>

I am suggesting a patch to atmel_srial.c.
It fixes the following problem, related to hardware flow control
(CTS/RTS): Transmitting while CTS line is asserted in DMA mode, due to
not checking for tx-stopped condition.

We found these problems while testing the UARTs with hardware
flow-control.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@...el.com>
---
 drivers/serial/atmel_serial.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index d5efd6c..89362d7 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -579,7 +579,7 @@ static void atmel_tx_dma(struct uart_port *port)
 	/* disable PDC transmit */
 	UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS);
 
-	if (!uart_circ_empty(xmit)) {
+	if (!uart_circ_empty(xmit) && !uart_tx_stopped(port)) {
 		dma_sync_single_for_device(port->dev,
 					   pdc->dma_addr,
 					   pdc->dma_size,
-- 
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ