diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2016-01-11 01:39:35 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-29 01:07:04 +0300 |
commit | 611e0d83a83724340d4bf0eed610af01401b2ff4 (patch) | |
tree | 72d0dc8ca23c7c1664174c7e45c90ffb7892180d /drivers/tty/serial/8250/8250_port.c | |
parent | d70a7b1626d64c8c57fb9258a81f427198b60700 (diff) | |
download | linux-611e0d83a83724340d4bf0eed610af01401b2ff4.tar.xz |
serial: 8250: Wait for irq to complete before shutdown
After masking all interrupts, wait for the irq handler to complete
before continuing shutdown.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250_port.c')
-rw-r--r-- | drivers/tty/serial/8250/8250_port.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index 9ef77a52c4f2..57b3a80b4359 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -2088,8 +2088,12 @@ void serial8250_do_shutdown(struct uart_port *port) /* * Disable interrupts from this port */ + spin_lock_irqsave(&port->lock, flags); up->ier = 0; serial_port_out(port, UART_IER, 0); + spin_unlock_irqrestore(&port->lock, flags); + + synchronize_irq(port->irq); if (up->dma) serial8250_release_dma(up); |