Two network cards share the same ISA IRQ?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Armin
Posts: 10
Joined: Sun Nov 22, 2009 6:16 am

Two network cards share the same ISA IRQ?

Post by Armin »

Hi,

I set up Qemu with two (different) network adapters (options -net model=rtl8139 and -net model=ne2k_pci). Then, my PCI listing reports that those devices use the same ISA IRQ, ie. number 11. Is that OK resp. is that "just the way it is" or should I see different IRQ numbers?

In case, that it's correct that both devices share the same IRQ of the PIC, what's the correct interrupt handling?
Call the interrupt handlers of those network devices one after the other and check the interrupt status register of each network device in detail to see if it really fired an IRQ?

Little bit confused...
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Two network cards share the same ISA IRQ?

Post by Combuster »

PCI is not ISA.

ISA devices raise IRQs by a change in signal. PCI devices raise IRQs by setting the signal high. The result is that you can share physical interrupt lines. If you get an interrupt from two PCI devices at the same time, you might handle the first device, then when you return from the interrupt, the signal is still high from the other and the interrupt will be called again.

The only thing you need to be careful of is that you will need to know which device is the one causing the interrupt, because a device that is not serviced will never lower the interrupt line and therefore keep putting you back in your interrupt handler because it thinks you only serviced another device.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply