aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Krill <ben@codiert.org>2009-05-13 01:56:54 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-05-15 02:43:42 -0400
commit951c4df5b7703137bf4eee002d98d083fbc890cc (patch)
treecd60e96d0a6e1deeba177894b8cfaa8ba51c0345
parent37cd8ed90fc5b11941110d2d0cea6807f86d4787 (diff)
serial/nwpserial: Fix wrong register read address and add interrupt acknowledge.
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>
-rw-r--r--drivers/serial/nwpserial.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/serial/nwpserial.c b/drivers/serial/nwpserial.c
index 32f3eaf0d262..9e150b19d726 100644
--- a/drivers/serial/nwpserial.c
+++ b/drivers/serial/nwpserial.c
@@ -145,11 +145,13 @@ static irqreturn_t nwpserial_interrupt(int irq, void *dev_id)
145 ch = dcr_read(up->dcr_host, UART_RX); 145 ch = dcr_read(up->dcr_host, UART_RX);
146 if (up->port.ignore_status_mask != NWPSERIAL_STATUS_RXVALID) 146 if (up->port.ignore_status_mask != NWPSERIAL_STATUS_RXVALID)
147 tty_insert_flip_char(tty, ch, TTY_NORMAL); 147 tty_insert_flip_char(tty, ch, TTY_NORMAL);
148 } while (dcr_read(up->dcr_host, UART_RX) & UART_LSR_DR); 148 } while (dcr_read(up->dcr_host, UART_LSR) & UART_LSR_DR);
149 149
150 tty_flip_buffer_push(tty); 150 tty_flip_buffer_push(tty);
151 ret = IRQ_HANDLED; 151 ret = IRQ_HANDLED;
152 152
153 /* clear interrupt */
154 dcr_write(up->dcr_host, UART_IIR, 1);
153out: 155out:
154 spin_unlock(&up->port.lock); 156 spin_unlock(&up->port.lock);
155 return ret; 157 return ret;