Skip to contentSkip to conversation

serial/nwpserial: fix wrong register read address and add interrupt acknowledge.

PATCH New Arnd Bergmann 1 participant 1 message May 13, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 serial/nwpserial: fix wrong register read address and add interrupt acknowledge.

From: Benjamin Krill <[email protected]>

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.

---
 drivers/serial/nwpserial.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/serial/nwpserial.c +3 -1
index 32f3eaf..9e150b1 100644
@@ -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;
Signature · 1 line
1.5.6.3