aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/serial_core.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index fbf6c5ad222f..a0e2f9d63b9d 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -1050,6 +1050,15 @@ static int uart_do_autoconfig(struct tty_struct *tty,struct uart_state *state)
1050 return ret; 1050 return ret;
1051} 1051}
1052 1052
1053static void uart_enable_ms(struct uart_port *uport)
1054{
1055 /*
1056 * Force modem status interrupts on
1057 */
1058 if (uport->ops->enable_ms)
1059 uport->ops->enable_ms(uport);
1060}
1061
1053/* 1062/*
1054 * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change 1063 * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change
1055 * - mask passed in arg for lines of interest 1064 * - mask passed in arg for lines of interest
@@ -1073,11 +1082,7 @@ uart_wait_modem_status(struct uart_state *state, unsigned long arg)
1073 */ 1082 */
1074 spin_lock_irq(&uport->lock); 1083 spin_lock_irq(&uport->lock);
1075 memcpy(&cprev, &uport->icount, sizeof(struct uart_icount)); 1084 memcpy(&cprev, &uport->icount, sizeof(struct uart_icount));
1076 1085 uart_enable_ms(uport);
1077 /*
1078 * Force modem status interrupts on
1079 */
1080 uport->ops->enable_ms(uport);
1081 spin_unlock_irq(&uport->lock); 1086 spin_unlock_irq(&uport->lock);
1082 1087
1083 add_wait_queue(&port->delta_msr_wait, &wait); 1088 add_wait_queue(&port->delta_msr_wait, &wait);
@@ -1508,7 +1513,7 @@ static int uart_carrier_raised(struct tty_port *port)
1508 struct uart_port *uport = state->uart_port; 1513 struct uart_port *uport = state->uart_port;
1509 int mctrl; 1514 int mctrl;
1510 spin_lock_irq(&uport->lock); 1515 spin_lock_irq(&uport->lock);
1511 uport->ops->enable_ms(uport); 1516 uart_enable_ms(uport);
1512 mctrl = uport->ops->get_mctrl(uport); 1517 mctrl = uport->ops->get_mctrl(uport);
1513 spin_unlock_irq(&uport->lock); 1518 spin_unlock_irq(&uport->lock);
1514 if (mctrl & TIOCM_CAR) 1519 if (mctrl & TIOCM_CAR)