aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/atmel_serial.c
diff options
context:
space:
mode:
authorItai Levi <itai.levi.devel@gmail.com>2009-01-15 16:50:43 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-15 19:39:35 -0500
commit1f14081d8b31b2780e2e6e2ae2766264e1f7d38b (patch)
treea6902b80c7baef2e49206a4c44c5f96a98fd6dc6 /drivers/serial/atmel_serial.c
parentdb0fb1848a645b0b1b033765f3a5244e7afd2e3c (diff)
atmel_serial: fix flow control bug
Fix 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@atmel.com> Cc: "Andrew Victor" <avictor.za@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial/atmel_serial.c')
-rw-r--r--drivers/serial/atmel_serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index d5efd6c77904..89362d733d62 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)
579 /* disable PDC transmit */ 579 /* disable PDC transmit */
580 UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS); 580 UART_PUT_PTCR(port, ATMEL_PDC_TXTDIS);
581 581
582 if (!uart_circ_empty(xmit)) { 582 if (!uart_circ_empty(xmit) && !uart_tx_stopped(port)) {
583 dma_sync_single_for_device(port->dev, 583 dma_sync_single_for_device(port->dev,
584 pdc->dma_addr, 584 pdc->dma_addr,
585 pdc->dma_size, 585 pdc->dma_size,