From: Greg KH <gregkh@linuxfoundation.org>
To: Richard Genoud <richard.genoud@gmail.com>
Cc: Gil Weber <webergil@gmail.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"#4 . 4+" <stable@vger.kernel.org>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>
Subject: Re: [PATCH] tty/serial: atmel: RS485 half duplex w/DMA: enable RX after TX is done
Date: Wed, 11 Jan 2017 08:09:09 +0100 [thread overview]
Message-ID: <20170111070909.GA24787@kroah.com> (raw)
In-Reply-To: <CACQ1gAifm3nWOyfGbugHf4pFDQ7NCks+H+cjZcwEhjPqfJ=5Mw@mail.gmail.com>
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
next prev parent reply other threads:[~2017-01-11 7:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 12:05 [PATCH] tty/serial: atmel: RS485 half duplex w/DMA: enable RX after TX is done Richard Genoud
2017-01-02 11:53 ` Alexandre Belloni
2017-01-02 14:14 ` Richard Genoud
2017-01-11 7:09 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-04-11 21:05 Alexandre Belloni
2017-04-12 12:51 ` Bryan Evenson
2017-04-12 18:45 ` Bryan Evenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170111070909.GA24787@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexandre.belloni@free-electrons.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=richard.genoud@gmail.com \
--cc=stable@vger.kernel.org \
--cc=webergil@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.