Skip to content

Commit

Permalink
serial/nwpserial: Fix wrong register read address and add interrupt a…
Browse files Browse the repository at this point in the history
…cknowledge.

The receive interrupt routine checks the wrong register if the
receive fifo is empty. Further an explicit interrupt acknowledge
write is introduced. In some circumstances another interrupt was
issued.

Signed-off-by: Benjamin Krill <ben@codiert.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Benjamin Krill authored and ozbenh committed May 15, 2009
1 parent 37cd8ed commit 951c4df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/serial/nwpserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,13 @@ static irqreturn_t nwpserial_interrupt(int irq, void *dev_id)
ch = dcr_read(up->dcr_host, UART_RX);
if (up->port.ignore_status_mask != NWPSERIAL_STATUS_RXVALID)
tty_insert_flip_char(tty, ch, TTY_NORMAL);
} while (dcr_read(up->dcr_host, UART_RX) & UART_LSR_DR);
} while (dcr_read(up->dcr_host, UART_LSR) & UART_LSR_DR);

tty_flip_buffer_push(tty);
ret = IRQ_HANDLED;

/* clear interrupt */
dcr_write(up->dcr_host, UART_IIR, 1);
out:
spin_unlock(&up->port.lock);
return ret;
Expand Down

0 comments on commit 951c4df

Please sign in to comment.