Handling several interrupts in linux kernel driver
by zvivered from LinuxQuestions.org on (#5J55B)
Hello,
I'm developing a kernel driver for a PCIe based card.
The card has one interrupt (legacy, not MSI)
Upon interrupt, a status register is read.
According to this register, N channels (out of 8) received a 4MB packet.
As you can see in line 15, a wait queue is declared.
I have to declare 8 queues.
Is it possible to declare an "array" of wait queues ?
Currently I have to write this line 8 times.
Is there a nicer way ?
The interrupt handler calls: sInterruptFlagPacket=1.
The application send an IOCTL request which is blocked (with timeout) till an interrupt received:
wait_event_interruptible(sWaitQueuePacket, sInterruptFlagPacket != 0);
sInterruptFlagPacket = 0;
Thank you,
Zvika
Attached Files


I'm developing a kernel driver for a PCIe based card.
The card has one interrupt (legacy, not MSI)
Upon interrupt, a status register is read.
According to this register, N channels (out of 8) received a 4MB packet.
As you can see in line 15, a wait queue is declared.
I have to declare 8 queues.
Is it possible to declare an "array" of wait queues ?
Currently I have to write this line 8 times.
Is there a nicer way ?
The interrupt handler calls: sInterruptFlagPacket=1.
The application send an IOCTL request which is blocked (with timeout) till an interrupt received:
wait_event_interruptible(sWaitQueuePacket, sInterruptFlagPacket != 0);
sInterruptFlagPacket = 0;
Thank you,
Zvika
Attached Files
![]() | Fio.txt (2.4 KB) |