Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1556244
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] tty/serial: atmel: RS485 half duplex w/DMA: enable RX after TX is done |
| Date | 2017-01-11 08:10 +0100 |
| Message-ID | <sYlcJ-3Oz-1@gated-at.bofh.it> (permalink) |
| References | <sLmJk-1Qg-21@gated-at.bofh.it> <sV9rs-6jY-17@gated-at.bofh.it> <sVbCV-7Tz-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jan 02, 2017 at 03:14:37PM +0100, Richard Genoud wrote:
> 2017-01-02 12:53 GMT+01:00 Alexandre Belloni
> <alexandre.belloni@free-electrons.com>:
> > On 06/12/2016 at 13:05:33 +0100, Richard Genoud wrote :
> >> 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: stable@vger.kernel.org
> >> Reported-by: Gil Weber <webergil@gmail.com>
> >> 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>
> >
> Greg, could you take this patch in your tree ?
Yes, will do so, thanks.
greg k-h
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] tty/serial: atmel: RS485 half duplex w/DMA: enable RX after TX is done Greg KH <gregkh@linuxfoundation.org> - 2017-01-11 08:10 +0100
csiph-web