lkml.org 
[lkml]   [2019]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/2] tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped
Date

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
\
 
 \ /
  Last update: 2019-03-18 15:58    [W:0.046 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site