Skip to content

Commit

Permalink
atmel_serial: fix flow control bug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Itai Levi authored and Linus Torvalds committed Jan 16, 2009
1 parent db0fb18 commit 1f14081
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/serial/atmel_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1f14081

Please sign in to comment.