* [PATCH 2/5] KGDB-8250: handle shared IRQ properly
@ 2008-01-29 23:44 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2008-01-29 23:44 UTC (permalink / raw)
To: Jason Wessel; +Cc: Ingo Molnar, Linux Kernel Mailing List, kgdb-bugreport
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-01-29 23:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-29 23:44 [PATCH 2/5] KGDB-8250: handle shared IRQ properly Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).