Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1208651

Re: [PATCH 1/4] serial: xuartps: Fix termios issue for enabling odd parity

From Peter Hurley <peter@hurleysoftware.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] serial: xuartps: Fix termios issue for enabling odd parity
Date 2015-08-17 17:40 +0200
Message-ID <pYuFY-30K-21@gated-at.bofh.it> (permalink)
References <pYn1L-tt-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/17/2015 03:22 AM, Michal Simek wrote:
> From: Anirudha Sarangi <anirudha.sarangi@xilinx.com>
> 
> Existing set_termios does not handle the option for enabling
> odd parity. This patch fixes it.

NAK. PARODD does not enable parity generation or detection.

Regards,
Peter Hurley

> Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
>  drivers/tty/serial/xilinx_uartps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
> index 009e0dbc12d2..a3020344ac9d 100644
> --- a/drivers/tty/serial/xilinx_uartps.c
> +++ b/drivers/tty/serial/xilinx_uartps.c
> @@ -723,7 +723,7 @@ static void cdns_uart_set_termios(struct uart_port *port,
>  	else
>  		cval |= CDNS_UART_MR_STOPMODE_1_BIT; /* 1 STOP bit */
>  
> -	if (termios->c_cflag & PARENB) {
> +	if ((termios->c_cflag & PARENB) || (termios->c_cflag & PARODD)) {
>  		/* Mark or Space parity */
>  		if (termios->c_cflag & CMSPAR) {
>  			if (termios->c_cflag & PARODD)
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] serial: xuartps: Fix termios issue for enabling odd parity Michal Simek <michal.simek@xilinx.com> - 2015-08-17 09:30 +0200
  [PATCH 4/4] serial: xuartps: Rewrite the interrupt handling logic Michal Simek <michal.simek@xilinx.com> - 2015-08-17 09:30 +0200
    Re: [PATCH 4/4] serial: xuartps: Rewrite the interrupt handling logic Peter Hurley <peter@hurleysoftware.com> - 2015-08-17 18:00 +0200
      Re: [PATCH 4/4] serial: xuartps: Rewrite the interrupt handling logic Peter Hurley <peter@hurleysoftware.com> - 2015-08-17 20:50 +0200
  Re: [PATCH 1/4] serial: xuartps: Fix termios issue for enabling odd  parity Peter Hurley <peter@hurleysoftware.com> - 2015-08-17 17:40 +0200
    Re: [PATCH 1/4] serial: xuartps: Fix termios issue for enabling odd  parity Peter Hurley <peter@hurleysoftware.com> - 2015-08-17 18:30 +0200

csiph-web