Messages in this thread | | | Subject | ISA vs PCI interrupt handling | From | Krzysztof Halasa <> | Date | 03 Apr 2003 01:20:45 +0200 |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |