linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Razvan.Stefanescu@microchip.com>
To: richard.genoud@gmail.com, gregkh@linuxfoundation.org, jslaby@suse.com
Cc: webergil@gmail.com, Nicolas.Ferre@microchip.com,
	alexandre.belloni@bootlin.com, Ludovic.Desroches@microchip.com,
	linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped
Date: Mon, 18 Mar 2019 14:57:45 +0000	[thread overview]
Message-ID: <bec23b27-875a-e78f-48db-2da493360338@microchip.com> (raw)
In-Reply-To: <cb09f654-1c42-4f0c-25d3-5cb1708d6080@sorico.fr>


On 18/03/2019 16:30, Richard Genoud wrote:
>> +		/* Start RX if flag was set and FIFO is empty */
>> +		if (atmel_port->hd_start_rx) {
>> +			if (atmel_uart_readl(port, ATMEL_US_CSR)
>> +					& ATMEL_US_TXEMPTY) {
>> +				atmel_port->hd_start_rx = false;
>> +				atmel_start_rx(port);
>> +			} else {
>> +				dev_warn(port->dev, "Should start RX, but TX fifo is not empty\n");
> What will happen in this case ?
> 

RX will not be started. I haven't been able to trigger this error case. 
Would it be better to start RX anyway and just display the error message 
if TX fifo is not empty? But this way it will be like before this fix, 
in case of an error.

Thank you,
Razvan

      reply	other threads:[~2019-03-18 14:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15  9:23 [PATCH 0/2] tty/serial: atmel: Fix RS485 half duplex operation Razvan Stefanescu
2019-03-15  9:23 ` [PATCH 1/2] tty/serial: atmel: Add is_half_duplex helper Razvan Stefanescu
2019-03-18 13:41   ` Richard Genoud
2019-03-18 14:17     ` Razvan.Stefanescu
2019-03-15  9:23 ` [PATCH 2/2] tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped Razvan Stefanescu
2019-03-18 14:30   ` Richard Genoud
2019-03-18 14:57     ` Razvan.Stefanescu [this message]

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=bec23b27-875a-e78f-48db-2da493360338@microchip.com \
    --to=razvan.stefanescu@microchip.com \
    --cc=Ludovic.Desroches@microchip.com \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=richard.genoud@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).