summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/atmel_serial.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2014-11-05 19:11:45 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-06 23:57:27 +0100
commitcab68f89546ba5a04bf28aaeaca841d4ccc2fd52 (patch)
tree77aa632377f99150cf70619a389a3de2790f2d86 /drivers/tty/serial/atmel_serial.c
parentserial: Take uart port lock for direct *_enable_ms() (diff)
downloadlinux-cab68f89546ba5a04bf28aaeaca841d4ccc2fd52.tar.xz
linux-cab68f89546ba5a04bf28aaeaca841d4ccc2fd52.zip
serial: Test/disable MSIs if switching from N_PPS
Switching to the N_PPS line discipline may require enabling modem status interrupts; conversely switching from N_PPS may require disabling modem status interrupts. Affected drivers: 8250 amba-pl010 atmel Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/atmel_serial.c')
-rw-r--r--drivers/tty/serial/atmel_serial.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index e67cb3831280..b1d61dc3fc1b 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2065,6 +2065,11 @@ static void atmel_set_ldisc(struct uart_port *port, struct ktermios *termios)
spin_unlock_irq(&port->lock);
} else {
port->flags &= ~UPF_HARDPPS_CD;
+ if (!UART_ENABLE_MS(port, termios->c_cflag)) {
+ spin_lock_irq(&port->lock);
+ atmel_disable_ms(port);
+ spin_unlock_irq(&port->lock);
+ }
}
}