linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Koeller <thomas.koeller@baslerweb.com>
To: rmk+serial@arm.linux.org.uk
Cc: linux-serial@vger.kernel.org
Subject: [PATCH] 8250 driver interrupt sharing
Date: Thu, 28 Oct 2004 13:01:58 +0200	[thread overview]
Message-ID: <200410281301.59584.thomas.koeller@baslerweb.com> (raw)

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

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


             reply	other threads:[~2004-10-28 10:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-28 11:01 Thomas Koeller [this message]
2004-10-28 11:00 ` [PATCH] 8250 driver interrupt sharing Russell King
2004-10-28 11:17   ` Thomas Koeller
2004-10-28 11:18     ` Russell King
2004-11-01 12:10 ` Russell King

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=200410281301.59584.thomas.koeller@baslerweb.com \
    --to=thomas.koeller@baslerweb.com \
    --cc=linux-serial@vger.kernel.org \
    --cc=rmk+serial@arm.linux.org.uk \
    /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 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).