serial: atmel: honor CREAD in atmel_set_termios
Subsystems (3)
PATCH 1/1 serial: atmel: honor CREAD in atmel_set_termios
Ignore received characters when CREAD is cleared by adding RXRDY to ignore_status_mask.
This replaces an existing TODO in the driver.
--- drivers/tty/serial/atmel_serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/atmel_serial.c +2 -2
@@ -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);
Signature · 1 line
2.43.0
Greg KH
maintainerQuoted 29 lines · 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 <[email protected]>--- drivers/tty/serial/atmel_serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/tty/serial/atmel_serial.c +2
-2@@ -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);Signature · 1 line
2.43.0
Cool, was this tested to work properly?
And a blank line is needed before the comment, right?
thanks,
greg k-h
PATCH 1/1 tty: serial: atmel: Ignore chars when CREAD is cleared
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.
---
v2:
- Add blank line before comment
- Tested on hardware
--- drivers/tty/serial/atmel_serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/atmel_serial.c +2 -1
@@ -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);
Signature · 1 line
2.43.0
Greg KH
maintainerRe: [PATCH] tty: serial: atmel: Ignore chars when CREAD is cleared
Quoted 35 lines · 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 <[email protected]>---
v2:
- Add blank line before comment
- Tested on hardware--- drivers/tty/serial/atmel_serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/tty/serial/atmel_serial.c +2
-1@@ -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);Signature · 1 line
2.43.0
No v2 in the subject line :(
PATCH v2 1/1 tty: serial: atmel: Ignore chars when CREAD is cleared
In reply to Greg KHIgnore received characters when CREAD is cleared by adding RXRDY to ignore_status_mask.
This replaces an existing TODO in the driver.
Tested on hardware.
---
v2:
- Add blank line before comment
- Tested on hardware
--- drivers/tty/serial/atmel_serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/atmel_serial.c +2 -1
@@ -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);
Signature · 1 line
2.43.0
Re: [PATCH v2] tty: serial: atmel: Ignore chars when CREAD is cleared
Hi Rakesh,
Le 11/05/2026 à 18:59, Rakesh Alasyam a écrit :
Quoted 6 lines
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.
Could you be more precise?
Which board(s) did you test with? (e.g. sama5d3_explained, custom...) Which SoC? (sam9g35, sama5d2...)
With DMA, PDC or none?
Regards,
Richard
Quoted 26 lines
Signed-off-by Rakesh Alasyam <[email protected]>---
v2:
- Add blank line before comment
- Tested on hardware--- drivers/tty/serial/atmel_serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/tty/serial/atmel_serial.c +2
-1@@ -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);