diff options
Diffstat (limited to 'drivers/tty/serial/8250.c')
-rw-r--r-- | drivers/tty/serial/8250.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c index f2dfec82faf8..7f50999eebc2 100644 --- a/drivers/tty/serial/8250.c +++ b/drivers/tty/serial/8250.c | |||
@@ -1819,6 +1819,8 @@ static void serial8250_backup_timeout(unsigned long data) | |||
1819 | unsigned int iir, ier = 0, lsr; | 1819 | unsigned int iir, ier = 0, lsr; |
1820 | unsigned long flags; | 1820 | unsigned long flags; |
1821 | 1821 | ||
1822 | spin_lock_irqsave(&up->port.lock, flags); | ||
1823 | |||
1822 | /* | 1824 | /* |
1823 | * Must disable interrupts or else we risk racing with the interrupt | 1825 | * Must disable interrupts or else we risk racing with the interrupt |
1824 | * based handler. | 1826 | * based handler. |
@@ -1836,10 +1838,8 @@ static void serial8250_backup_timeout(unsigned long data) | |||
1836 | * the "Diva" UART used on the management processor on many HP | 1838 | * the "Diva" UART used on the management processor on many HP |
1837 | * ia64 and parisc boxes. | 1839 | * ia64 and parisc boxes. |
1838 | */ | 1840 | */ |
1839 | spin_lock_irqsave(&up->port.lock, flags); | ||
1840 | lsr = serial_in(up, UART_LSR); | 1841 | lsr = serial_in(up, UART_LSR); |
1841 | up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; | 1842 | up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; |
1842 | spin_unlock_irqrestore(&up->port.lock, flags); | ||
1843 | if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) && | 1843 | if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) && |
1844 | (!uart_circ_empty(&up->port.state->xmit) || up->port.x_char) && | 1844 | (!uart_circ_empty(&up->port.state->xmit) || up->port.x_char) && |
1845 | (lsr & UART_LSR_THRE)) { | 1845 | (lsr & UART_LSR_THRE)) { |
@@ -1848,11 +1848,13 @@ static void serial8250_backup_timeout(unsigned long data) | |||
1848 | } | 1848 | } |
1849 | 1849 | ||
1850 | if (!(iir & UART_IIR_NO_INT)) | 1850 | if (!(iir & UART_IIR_NO_INT)) |
1851 | serial8250_handle_port(up); | 1851 | transmit_chars(up); |
1852 | 1852 | ||
1853 | if (is_real_interrupt(up->port.irq)) | 1853 | if (is_real_interrupt(up->port.irq)) |
1854 | serial_out(up, UART_IER, ier); | 1854 | serial_out(up, UART_IER, ier); |
1855 | 1855 | ||
1856 | spin_unlock_irqrestore(&up->port.lock, flags); | ||
1857 | |||
1856 | /* Standard timer interval plus 0.2s to keep the port running */ | 1858 | /* Standard timer interval plus 0.2s to keep the port running */ |
1857 | mod_timer(&up->timer, | 1859 | mod_timer(&up->timer, |
1858 | jiffies + uart_poll_timeout(&up->port) + HZ / 5); | 1860 | jiffies + uart_poll_timeout(&up->port) + HZ / 5); |