[PATCH] KGDB-8250: fix initial interrupt

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jason Wessel <jason.wessel@...>
Cc: Linux Kernel Mailing List <linux-kernel@...>, <kgdb-bugreport@...>
Date: Thursday, February 7, 2008 - 3:38 am

Latest rework of kgdb8250_interrupt caused a regression in that the new
code wrongly assumes a ctrl-c character is also sent on initial connect
from the host. Here is a fix.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>

---
 drivers/serial/8250_kgdb.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: b/drivers/serial/8250_kgdb.c
===================================================================
--- a/drivers/serial/8250_kgdb.c
+++ b/drivers/serial/8250_kgdb.c
@@ -124,10 +124,10 @@ static irqreturn_t kgdb8250_interrupt(in

 	if ((iir & UART_IIR_ID) == UART_IIR_RDI) {
 		c = kgdb8250_ioread(UART_RX);
-		if (c == 0x03)
-			breakpoint();
-		else
+		if (c != 0x03)
 			buffered_char = c;
+		if (c == 0x03 || !kgdb_connected)
+			breakpoint();
 	}
 	return IRQ_HANDLED;
 }
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] KGDB-8250: fix initial interrupt, Jan Kiszka, (Thu Feb 7, 3:38 am)