[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bec23b27-875a-e78f-48db-2da493360338@microchip.com>
Date: Mon, 18 Mar 2019 14:57:45 +0000
From: <Razvan.Stefanescu@...rochip.com>
To: <richard.genoud@...il.com>, <gregkh@...uxfoundation.org>,
<jslaby@...e.com>
CC: <webergil@...il.com>, <Nicolas.Ferre@...rochip.com>,
<alexandre.belloni@...tlin.com>, <Ludovic.Desroches@...rochip.com>,
<linux-serial@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] tty/serial: atmel: RS485 HD w/DMA: enable RX after TX
is stopped
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
Powered by blists - more mailing lists