Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16733
b: refs/heads/master
c: 45e2460
h: refs/heads/master
i:
  16731: a640c53
v: v3
  • Loading branch information
Russell King authored and Russell King committed Jan 4, 2006
1 parent 25b3e9e commit fec3df9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: 50aec3b561de4e435204ad315e5c5ab58ef9feda
refs/heads/master: 45e24601921fc1c4ca7932f7f7a475d3ad64ecad
15 changes: 8 additions & 7 deletions trunk/drivers/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,11 @@ static unsigned int check_modem_status(struct uart_8250_port *up)
static inline void
serial8250_handle_port(struct uart_8250_port *up, struct pt_regs *regs)
{
unsigned int status = serial_inp(up, UART_LSR);
unsigned int status;

spin_lock(&up->port.lock);

status = serial_inp(up, UART_LSR);

DEBUG_INTR("status = %x...", status);

Expand All @@ -1290,6 +1294,8 @@ serial8250_handle_port(struct uart_8250_port *up, struct pt_regs *regs)
check_modem_status(up);
if (status & UART_LSR_THRE)
transmit_chars(up);

spin_unlock(&up->port.lock);
}

/*
Expand Down Expand Up @@ -1325,9 +1331,7 @@ static irqreturn_t serial8250_interrupt(int irq, void *dev_id, struct pt_regs *r

iir = serial_in(up, UART_IIR);
if (!(iir & UART_IIR_NO_INT)) {
spin_lock(&up->port.lock);
serial8250_handle_port(up, regs);
spin_unlock(&up->port.lock);

handled = 1;

Expand Down Expand Up @@ -1426,11 +1430,8 @@ static void serial8250_timeout(unsigned long data)
unsigned int iir;

iir = serial_in(up, UART_IIR);
if (!(iir & UART_IIR_NO_INT)) {
spin_lock(&up->port.lock);
if (!(iir & UART_IIR_NO_INT))
serial8250_handle_port(up, NULL);
spin_unlock(&up->port.lock);
}

timeout = up->port.timeout;
timeout = timeout > 6 ? (timeout / 2 - 2) : 1;
Expand Down

0 comments on commit fec3df9

Please sign in to comment.