[PATCH] serial: atmel: honor CREAD in atmel_set_termios

Greg KH gregkh at linuxfoundation.org
Mon May 11 08:17:33 PDT 2026


On Fri, May 01, 2026 at 01:43:17PM +0530, Rakesh Alasyam wrote:
> Ignore received characters when CREAD is cleared by adding RXRDY
> to ignore_status_mask.
> 
> This replaces an existing TODO in the driver.
> 
> Signed-off-by: Rakesh Alasyam <alasyamrakesh77 at gmail.com>
> ---
>  drivers/tty/serial/atmel_serial.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 5d8c1cfc1c60..5b062d8ccabe 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2184,8 +2184,8 @@ static void atmel_set_termios(struct uart_port *port,
>  		if (termios->c_iflag & IGNPAR)
>  			port->ignore_status_mask |= ATMEL_US_OVRE;
>  	}
> -	/* TODO: Ignore all characters if CREAD is set.*/
> -
> +	if (!(termios->c_cflag & CREAD))
> +		port->ignore_status_mask |= ATMEL_US_RXRDY;
>  	/* update the per-port timeout */
>  	uart_update_timeout(port, termios->c_cflag, baud);
>  
> -- 
> 2.43.0
> 
> 

Cool, was this tested to work properly?

And a blank line is needed before the comment, right?

thanks,

greg k-h



More information about the linux-arm-kernel mailing list