diff options
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r-- | drivers/serial/8250.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index ce948b66bbd4..27f34a9f9cb7 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -1874,7 +1874,9 @@ static int serial8250_startup(struct uart_port *port) * the interrupt is enabled. Delays are necessary to * allow register changes to become visible. */ - spin_lock_irqsave(&up->port.lock, flags); + spin_lock(&up->port.lock); + if (up->port.flags & UPF_SHARE_IRQ) + disable_irq_nosync(up->port.irq); wait_for_xmitr(up, UART_LSR_THRE); serial_out_sync(up, UART_IER, UART_IER_THRI); @@ -1886,7 +1888,9 @@ static int serial8250_startup(struct uart_port *port) iir = serial_in(up, UART_IIR); serial_out(up, UART_IER, 0); - spin_unlock_irqrestore(&up->port.lock, flags); + if (up->port.flags & UPF_SHARE_IRQ) + enable_irq(up->port.irq); + spin_unlock(&up->port.lock); /* * If the interrupt is not reasserted, setup a timer to |