From: Krzysztof Halasa <khc@pm.waw.pl>
To: <linux-kernel@vger.kernel.org>
Subject: ISA vs PCI interrupt handling
Date: 03 Apr 2003 01:20:45 +0200 [thread overview]
Message-ID: <m3n0j8lc4y.fsf@defiant.pm.waw.pl> (raw)
Hi,
A simple question: there are drivers for ISA and PCI devices. The IRQ
handlers are registered with request_irq(flags = 0) or
request_irq(SA_SHIRQ) for PCI.
In both cases, the device raises an IRQ line and the handler is called.
Does the handler have to make sure the device has lowered the IRQ?
I mean, in situation where the handler terminates with the IRQ line
being still active, will the handler be called again, or will the
driver deadlock? Does is behave differently on ISA and PCI?
Many network drivers use something like this:
static void
net_rx(struct net_device *dev)
{
int boguscount = 10;
do {
do_something();
} while (--boguscount);
}
Will such an IRQ handler work correctly after boguscount reaches 0?
Or is it just a protection against runaway devices, and it's normal
that they die from it (possibly recovering through a timer)?
My experiments with ISA devices show that after the handler terminates
without i.e. handling all requests, the IRQ line is stuck at +5V
(= logical "active" level) and the handler isn't called anymore.
Or does that mean the IRQ is edge-triggered, and the handler is being
called just once a low-to-high edge is detected?
--
Krzysztof Halasa
Network Administrator
next reply other threads:[~2003-04-02 23:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-02 23:20 Krzysztof Halasa [this message]
2003-04-03 10:43 ` Alan Cox
2003-04-03 19:17 ` Krzysztof Halasa
2003-04-03 19:42 Jonathan Lundell
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=m3n0j8lc4y.fsf@defiant.pm.waw.pl \
--to=khc@pm.waw.pl \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®