aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/mpsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/mpsc.c')
-rw-r--r--drivers/serial/mpsc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c
index 567fa789c5c7..e984abf3e4d9 100644
--- a/drivers/serial/mpsc.c
+++ b/drivers/serial/mpsc.c
@@ -1520,7 +1520,6 @@ mpsc_set_termios(struct uart_port *port, struct ktermios *termios,
1520 mpsc_set_baudrate(pi, baud); 1520 mpsc_set_baudrate(pi, baud);
1521 1521
1522 /* Characters/events to read */ 1522 /* Characters/events to read */
1523 pi->rcv_data = 1;
1524 pi->port.read_status_mask = SDMA_DESC_CMDSTAT_OR; 1523 pi->port.read_status_mask = SDMA_DESC_CMDSTAT_OR;
1525 1524
1526 if (termios->c_iflag & INPCK) 1525 if (termios->c_iflag & INPCK)
@@ -1544,11 +1543,15 @@ mpsc_set_termios(struct uart_port *port, struct ktermios *termios,
1544 pi->port.ignore_status_mask |= SDMA_DESC_CMDSTAT_OR; 1543 pi->port.ignore_status_mask |= SDMA_DESC_CMDSTAT_OR;
1545 } 1544 }
1546 1545
1547 /* Ignore all chars if CREAD not set */ 1546 if ((termios->c_cflag & CREAD)) {
1548 if (!(termios->c_cflag & CREAD)) 1547 if (!pi->rcv_data) {
1548 pi->rcv_data = 1;
1549 mpsc_start_rx(pi);
1550 }
1551 } else if (pi->rcv_data) {
1552 mpsc_stop_rx(port);
1549 pi->rcv_data = 0; 1553 pi->rcv_data = 0;
1550 else 1554 }
1551 mpsc_start_rx(pi);
1552 1555
1553 spin_unlock_irqrestore(&pi->port.lock, flags); 1556 spin_unlock_irqrestore(&pi->port.lock, flags);
1554 return; 1557 return;