Files
linux/drivers/tty/serial
Richard Genoud 990a142ee0 tty/serial: atmel: RS485 half duplex w/DMA: enable RX after TX is done
commit b389f173aa upstream.

When using RS485 in half duplex, RX should be enabled when TX is
finished, and stopped when TX starts.

Before commit 0058f0871e ("tty/serial: atmel: fix RS485 half
duplex with DMA"), RX was not disabled in atmel_start_tx() if the DMA
was used. So, collisions could happened.

But disabling RX in atmel_start_tx() uncovered another bug:
RX was enabled again in the wrong place (in atmel_tx_dma) instead of
being enabled when TX is finished (in atmel_complete_tx_dma), so the
transmission simply stopped.

This bug was not triggered before commit 0058f0871e
("tty/serial: atmel: fix RS485 half duplex with DMA") because RX was
never disabled before.

Moving atmel_start_rx() in atmel_complete_tx_dma() corrects the problem.

Reported-by: Gil Weber <webergil@gmail.com>
Fixes: 0058f0871e
Tested-by: Gil Weber <webergil@gmail.com>
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Tested-by: Bryan Evenson <bevenson@melinkcorp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-21 09:30:08 +02:00
..
2015-03-26 23:00:36 +01:00
2015-10-17 21:11:29 -07:00
2015-10-17 21:11:29 -07:00
2015-11-20 16:19:54 -08:00
2015-10-12 10:54:35 -07:00
2015-03-26 22:49:10 +01:00
2015-03-26 22:49:10 +01:00
2014-06-19 13:04:52 -07:00
2015-10-17 21:11:29 -07:00
2014-06-19 13:04:52 -07:00