Davide Ancri <firstname.lastname@example.org> wrote:
David Gibbs wrote:
It could be useful when my driver wants to handle more than one PCI card
(all the same Vendor/Device ID), so it can install only one interrupt
serviceing routine (after assigning all the handled cards to the same
IRQ, of course).
This is much more efficient than run one driver instance for each card
(too much context switches…)
Still use only one driver. Have it attach to (potentially) multiple different
The more effecient way would be to have a seperate handler for each
possible IRQ line (e.g. handler_irq_5, handler_irq_7, handler_irq_11)
and as you detect the appropriate cards, attach only the irq handlers
for which you have interrupts.
Then, when you get an irq on interrupt 5, you actually can be more
efficient – you only have to query the card or cards attached to
irq 5 to see if they generated the interrupt. If you have all your
cards attached to the same irq, you have to query every card on every
Yes, there is a mild code overhead for what I’ve just proposed. But ISR
should be short anyway, so shouldn’t be too much.
QNX Training Services
I do not answer technical questions by email.