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>
This commit is contained in:
Peter Hurley 2016-01-10 14:39:35 -08:00 committed by Greg Kroah-Hartman
parent d70a7b1626
commit 611e0d83a8
1 changed files with 4 additions and 0 deletions

View File

@ -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);