diff options
author | Richard Genoud <[email protected]> | 2016-12-06 13:05:33 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2017-01-11 08:18:45 +0100 |
commit | b389f173aaa1204d6dc1f299082a162eb0491545 (patch) | |
tree | d702ef5021258fc6894bec24dcb2e68a06a3c0a5 /include/linux/iio/timer/stm32-timer-trigger.h | |
parent | 89d8232411a85b9a6b12fd5da4d07d8a138a8e0c (diff) |
tty/serial: atmel: RS485 half duplex w/DMA: enable RX after TX is done
When using RS485 in half duplex, RX should be enabled when TX is
finished, and stopped when TX starts.
Before commit 0058f0871efe7b01c6 ("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 0058f0871efe7b01c6
("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.
Cc: [email protected]
Reported-by: Gil Weber <[email protected]>
Fixes: 0058f0871efe7b01c6
Tested-by: Gil Weber <[email protected]>
Signed-off-by: Richard Genoud <[email protected]>
Acked-by: Alexandre Belloni <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'include/linux/iio/timer/stm32-timer-trigger.h')
0 files changed, 0 insertions, 0 deletions