linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 8250 driver interrupt sharing
@ 2004-10-28 11:01 Thomas Koeller
  2004-10-28 11:00 ` Russell King
  2004-11-01 12:10 ` Russell King
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Koeller @ 2004-10-28 11:01 UTC (permalink / raw)
  To: rmk+serial; +Cc: linux-serial

Hi,

here is a little patch that causes the driver to no longer pretend having
handled an interrupt if none of the ports actually interrupted. I am currently
doing a port to a platform where I want (actually, have) to share a single
interrupt between serial ports and other devices. The patch is against kernel
version 2.6.9.

tk

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>

--- linux-2.6.9-old/drivers/serial/8250.c       2004-10-28 12:45:30.103541664 +0200
+++ linux-2.6.9/drivers/serial/8250.c   2004-10-28 12:48:19.009864000 +0200
@@ -1039,6 +1039,7 @@ static irqreturn_t serial8250_interrupt(
        struct irq_info *i = dev_id;
        struct list_head *l, *end = NULL;
        int pass_counter = 0;
+       irqreturn_t ret = IRQ_NONE;

        DEBUG_INTR("serial8250_interrupt(%d)...", irq);

@@ -1056,6 +1057,7 @@ static irqreturn_t serial8250_interrupt(
                        spin_lock(&up->port.lock);
                        serial8250_handle_port(up, regs);
                        spin_unlock(&up->port.lock);
+                       ret = IRQ_HANDLED;

                        end = NULL;
                } else if (end == NULL)
@@ -1074,8 +1076,7 @@ static irqreturn_t serial8250_interrupt(
        spin_unlock(&i->lock);

        DEBUG_INTR("end.\n");
-       /* FIXME! Was it really ours? */
-       return IRQ_HANDLED;
+       return ret;
 }

 /*

-- 
--------------------------------------------------

Thomas Koeller, Software Development
Basler Vision Technologies

thomas dot koeller at baslerweb dot com
http://www.baslerweb.com

==============================


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-11-01 12:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-28 11:01 [PATCH] 8250 driver interrupt sharing Thomas Koeller
2004-10-28 11:00 ` Russell King
2004-10-28 11:17   ` Thomas Koeller
2004-10-28 11:18     ` Russell King
2004-11-01 12:10 ` Russell King

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).