Commit 212d249b authored by Nava kishore Manne's avatar Nava kishore Manne Committed by Greg Kroah-Hartman

serial: xuartps: Removed unwanted checks while reading the error conditions

This patch Remove the unwated checks while reading the parity,framing,
overrun and Break detection errors.
Signed-off-by: default avatarNava kishore Manne <navam@xilinx.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
[stelford@cadence.com: cherry picked from
https://github.com/Xilinx/linux-xlnx commit
b1cf74970df5470ffbc8e7876a9edf5e3498ef94]
Signed-off-by: default avatarScott Telford <stelford@cadence.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c8dbdc84
...@@ -248,48 +248,46 @@ static void cdns_uart_handle_rx(void *dev_id, unsigned int isrstatus) ...@@ -248,48 +248,46 @@ static void cdns_uart_handle_rx(void *dev_id, unsigned int isrstatus)
status_mask = port->read_status_mask; status_mask = port->read_status_mask;
status_mask &= ~port->ignore_status_mask; status_mask &= ~port->ignore_status_mask;
if ((isrstatus & CDNS_UART_IXR_TOUT) || if (data &&
(isrstatus & CDNS_UART_IXR_RXTRIG)) { (port->read_status_mask & CDNS_UART_IXR_BRK)) {
if (data && port->read_status_mask &= ~CDNS_UART_IXR_BRK;
(port->read_status_mask & CDNS_UART_IXR_BRK)) { port->icount.brk++;
port->read_status_mask &= ~CDNS_UART_IXR_BRK; if (uart_handle_break(port))
port->icount.brk++;
if (uart_handle_break(port))
continue;
}
if (uart_handle_sysrq_char(port, data))
continue; continue;
}
if (is_rxbs_support) { if (uart_handle_sysrq_char(port, data))
if ((rxbs_status & CDNS_UART_RXBS_PARITY) continue;
&& (status_mask & CDNS_UART_IXR_PARITY)) {
port->icount.parity++; if (is_rxbs_support) {
status = TTY_PARITY; if ((rxbs_status & CDNS_UART_RXBS_PARITY)
} && (status_mask & CDNS_UART_IXR_PARITY)) {
if ((rxbs_status & CDNS_UART_RXBS_FRAMING) port->icount.parity++;
&& (status_mask & CDNS_UART_IXR_PARITY)) { status = TTY_PARITY;
port->icount.frame++; }
status = TTY_FRAME; if ((rxbs_status & CDNS_UART_RXBS_FRAMING)
} && (status_mask & CDNS_UART_IXR_PARITY)) {
} else { port->icount.frame++;
if (isrstatus & CDNS_UART_IXR_PARITY) { status = TTY_FRAME;
port->icount.parity++;
status = TTY_PARITY;
}
if ((isrstatus & CDNS_UART_IXR_FRAMING) &&
!framerrprocessed) {
port->icount.frame++;
status = TTY_FRAME;
}
} }
if (isrstatus & CDNS_UART_IXR_OVERRUN) { } else {
port->icount.overrun++; if (isrstatus & CDNS_UART_IXR_PARITY) {
tty_insert_flip_char(&port->state->port, 0, port->icount.parity++;
TTY_OVERRUN); status = TTY_PARITY;
} }
tty_insert_flip_char(&port->state->port, data, status); if ((isrstatus & CDNS_UART_IXR_FRAMING) &&
!framerrprocessed) {
port->icount.frame++;
status = TTY_FRAME;
}
}
if (isrstatus & CDNS_UART_IXR_OVERRUN) {
port->icount.overrun++;
tty_insert_flip_char(&port->state->port, 0,
TTY_OVERRUN);
} }
tty_insert_flip_char(&port->state->port, data, status);
isrstatus = 0;
} }
spin_unlock(&port->lock); spin_unlock(&port->lock);
tty_flip_buffer_push(&port->state->port); tty_flip_buffer_push(&port->state->port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment