Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH] serial: atmel: honor CREAD in atmel_set_termios
@ 2026-05-01  8:13 Rakesh Alasyam
  2026-05-11 15:17 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Rakesh Alasyam @ 2026-05-01  8:13 UTC (permalink / raw)
  To: richard.genoud, gregkh, jirislaby
  Cc: nicolas.ferre, alexandre.belloni, claudiu.beznea, linux-serial,
	linux-kernel, linux-arm-kernel, Rakesh Alasyam

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@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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] serial: atmel: honor CREAD in atmel_set_termios
  2026-05-01  8:13 [PATCH] serial: atmel: honor CREAD in atmel_set_termios Rakesh Alasyam
@ 2026-05-11 15:17 ` Greg KH
  2026-05-11 15:56   ` [PATCH] tty: serial: atmel: Ignore chars when CREAD is cleared Rakesh Alasyam
  2026-05-11 16:59   ` [PATCH v2] " Rakesh Alasyam
  0 siblings, 2 replies; 5+ messages in thread
From: Greg KH @ 2026-05-11 15:17 UTC (permalink / raw)
  To: Rakesh Alasyam
  Cc: richard.genoud, jirislaby, nicolas.ferre, alexandre.belloni,
	claudiu.beznea, linux-serial, linux-kernel, linux-arm-kernel

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@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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] tty: serial: atmel: Ignore chars when CREAD is cleared
  2026-05-11 15:17 ` Greg KH
@ 2026-05-11 15:56   ` Rakesh Alasyam
  2026-05-11 16:54     ` Greg KH
  2026-05-11 16:59   ` [PATCH v2] " Rakesh Alasyam
  1 sibling, 1 reply; 5+ messages in thread
From: Rakesh Alasyam @ 2026-05-11 15:56 UTC (permalink / raw)
  To: gregkh
  Cc: richard.genoud, jirislaby, nicolas.ferre, alexandre.belloni,
	claudiu.beznea, linux-serial, linux-kernel, linux-arm-kernel,
	Rakesh Alasyam

Ignore received characters when CREAD is cleared by adding RXRDY
to ignore_status_mask.

This replaces an existing TODO in the driver.

Tested on hardware.

Signed-off-by: Rakesh Alasyam <alasyamrakesh77@gmail.com>

---

v2:
- Add blank line before comment
- Tested on hardware
---
 drivers/tty/serial/atmel_serial.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 5d8c1cfc1c60..5c756dc904b0 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2184,7 +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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] tty: serial: atmel: Ignore chars when CREAD is cleared
  2026-05-11 15:56   ` [PATCH] tty: serial: atmel: Ignore chars when CREAD is cleared Rakesh Alasyam
@ 2026-05-11 16:54     ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2026-05-11 16:54 UTC (permalink / raw)
  To: Rakesh Alasyam
  Cc: richard.genoud, jirislaby, nicolas.ferre, alexandre.belloni,
	claudiu.beznea, linux-serial, linux-kernel, linux-arm-kernel

On Mon, May 11, 2026 at 09:26:55PM +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.
> 
> Tested on hardware.
> 
> Signed-off-by: Rakesh Alasyam <alasyamrakesh77@gmail.com>
> 
> ---
> 
> v2:
> - Add blank line before comment
> - Tested on hardware
> ---
>  drivers/tty/serial/atmel_serial.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 5d8c1cfc1c60..5c756dc904b0 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2184,7 +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
> 

No v2 in the subject line :(

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] tty: serial: atmel: Ignore chars when CREAD is cleared
  2026-05-11 15:17 ` Greg KH
  2026-05-11 15:56   ` [PATCH] tty: serial: atmel: Ignore chars when CREAD is cleared Rakesh Alasyam
@ 2026-05-11 16:59   ` Rakesh Alasyam
  1 sibling, 0 replies; 5+ messages in thread
From: Rakesh Alasyam @ 2026-05-11 16:59 UTC (permalink / raw)
  To: gregkh
  Cc: richard.genoud, jirislaby, nicolas.ferre, alexandre.belloni,
	claudiu.beznea, linux-serial, linux-kernel, linux-arm-kernel,
	Rakesh Alasyam

Ignore received characters when CREAD is cleared by adding RXRDY
to ignore_status_mask.

This replaces an existing TODO in the driver.

Tested on hardware.

Signed-off-by: Rakesh Alasyam <alasyamrakesh77@gmail.com>

---

v2:
- Add blank line before comment
- Tested on hardware
---
 drivers/tty/serial/atmel_serial.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 5d8c1cfc1c60..5c756dc904b0 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2184,7 +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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-11 17:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-01  8:13 [PATCH] serial: atmel: honor CREAD in atmel_set_termios Rakesh Alasyam
2026-05-11 15:17 ` Greg KH
2026-05-11 15:56   ` [PATCH] tty: serial: atmel: Ignore chars when CREAD is cleared Rakesh Alasyam
2026-05-11 16:54     ` Greg KH
2026-05-11 16:59   ` [PATCH v2] " Rakesh Alasyam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox