1 --- a/drivers/serial/8250.c
2 +++ b/drivers/serial/8250.c
3 @@ -1743,6 +1743,7 @@ static void serial8250_backup_timeout(un
4 unsigned int iir, ier = 0, lsr;
7 + spin_lock_irqsave(&up->port.lock, flags);
9 * Must disable interrupts or else we risk racing with the interrupt
11 @@ -1760,10 +1761,8 @@ static void serial8250_backup_timeout(un
12 * the "Diva" UART used on the management processor on many HP
13 * ia64 and parisc boxes.
15 - spin_lock_irqsave(&up->port.lock, flags);
16 lsr = serial_in(up, UART_LSR);
17 up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
18 - spin_unlock_irqrestore(&up->port.lock, flags);
19 if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) &&
20 (!uart_circ_empty(&up->port.info->xmit) || up->port.x_char) &&
21 (lsr & UART_LSR_THRE)) {
22 @@ -1771,12 +1770,14 @@ static void serial8250_backup_timeout(un
26 - if (!(iir & UART_IIR_NO_INT))
27 - serial8250_handle_port(up);
29 if (is_real_interrupt(up->port.irq))
30 serial_out(up, UART_IER, ier);
32 + spin_unlock_irqrestore(&up->port.lock, flags);
34 + if (!(iir & UART_IIR_NO_INT))
35 + serial8250_handle_port(up);
37 /* Standard timer interval plus 0.2s to keep the port running */
39 jiffies + poll_timeout(up->port.timeout) + HZ / 5);