Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263419
b: refs/heads/master
c: dbb3b1c
h: refs/heads/master
i:
  263417: 810f90d
  263415: 9bd8339
v: v3
  • Loading branch information
Al Cooper authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 2884fae commit 82a8ed5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dacacc3e794c4c5bab05d97afc19e372e1877943
refs/heads/master: dbb3b1ca5609d1f3848cd387d06cc60aaacf7f98
8 changes: 5 additions & 3 deletions trunk/drivers/tty/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,8 @@ static void serial8250_backup_timeout(unsigned long data)
unsigned int iir, ier = 0, lsr;
unsigned long flags;

spin_lock_irqsave(&up->port.lock, flags);

/*
* Must disable interrupts or else we risk racing with the interrupt
* based handler.
Expand All @@ -1836,10 +1838,8 @@ static void serial8250_backup_timeout(unsigned long data)
* the "Diva" UART used on the management processor on many HP
* ia64 and parisc boxes.
*/
spin_lock_irqsave(&up->port.lock, flags);
lsr = serial_in(up, UART_LSR);
up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
spin_unlock_irqrestore(&up->port.lock, flags);
if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) &&
(!uart_circ_empty(&up->port.state->xmit) || up->port.x_char) &&
(lsr & UART_LSR_THRE)) {
Expand All @@ -1848,11 +1848,13 @@ static void serial8250_backup_timeout(unsigned long data)
}

if (!(iir & UART_IIR_NO_INT))
serial8250_handle_port(up);
transmit_chars(up);

if (is_real_interrupt(up->port.irq))
serial_out(up, UART_IER, ier);

spin_unlock_irqrestore(&up->port.lock, flags);

/* Standard timer interval plus 0.2s to keep the port running */
mod_timer(&up->timer,
jiffies + uart_poll_timeout(&up->port) + HZ / 5);
Expand Down

0 comments on commit 82a8ed5

Please sign in to comment.