All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Jason Wessel <jason.wessel@windriver.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	kgdb-bugreport@lists.sourceforge.net
Subject: [PATCH 2/5] KGDB-8250: handle shared IRQ properly
Date: Wed, 30 Jan 2008 00:44:34 +0100	[thread overview]
Message-ID: <479FBA62.3000106@web.de> (raw)

Currently, KGDB's 8250 driver always reports IRQs as handled, though it
registers the line with IRQF_SHARED. This patch fixes the behavior by
returning the appropriate values from the interrupt handler.

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

---
 drivers/serial/8250_kgdb.c |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

Index: b/drivers/serial/8250_kgdb.c
===================================================================
--- a/drivers/serial/8250_kgdb.c
+++ b/drivers/serial/8250_kgdb.c
@@ -152,14 +152,15 @@ static int kgdb_get_debug_char(void)
 static irqreturn_t
 kgdb8250_interrupt(int irq, void *dev_id)
 {
-	if (kgdb_ioread(UART_IIR) & UART_IIR_RDI) {
-		/* Throw away the data if another I/O routine is active. */
-		if (kgdb_io_ops.read_char != kgdb_get_debug_char &&
-				(kgdb_ioread(UART_LSR) & UART_LSR_DR))
-			kgdb_ioread(UART_RX);
-		else
-			breakpoint();
-	}
+	if (!(kgdb_ioread(UART_IIR) & UART_IIR_RDI))
+		return IRQ_NONE;
+
+	/* Throw away the data if another I/O routine is active. */
+	if (kgdb_io_ops.read_char != kgdb_get_debug_char &&
+	    (kgdb_ioread(UART_LSR) & UART_LSR_DR))
+		kgdb_ioread(UART_RX);
+	else
+		breakpoint();
 
 	return IRQ_HANDLED;
 }

                 reply	other threads:[~2008-01-29 23:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=479FBA62.3000106@web.de \
    --to=jan.kiszka@web.de \
    --cc=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.