Article 5J55B Handling several interrupts in linux kernel driver

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
txt.gifFio.txt (2.4 KB)
latest?d=yIl2AUoC8zA latest?i=FUJiXKZmP04:iv6VWkRFjzg:F7zBnMy latest?i=FUJiXKZmP04:iv6VWkRFjzg:V_sGLiP latest?d=qj6IDK7rITs latest?i=FUJiXKZmP04:iv6VWkRFjzg:gIN9vFwFUJiXKZmP04
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments