SA_INTERRUPT and SA_SHIRQ

Colin Plumb (colin@nyx.net)
Wed, 13 Nov 96 01:19:25 MST


I have a PCI bus machine that puts everything on IRQ 9. (Or, at least,
I haven't figured out how to change it.)

I have this problem in that the devices I have are (/proc/pci):

PCI devices found:
Bus 0, device 17, function 0:
VGA compatible controller: Matrox Millenium (rev 1).
Medium devsel. Fast back-to-back capable. IRQ 11.
Non-prefetchable 32 bit memory at 0xffbec000.
Prefetchable 32 bit memory at 0xff000000.
Bus 0, device 15, function 0:
Ethernet controller: 3Com 3C595 100bTX (rev 0).
Medium devsel. IRQ 9. Master Capable. Latency=248. Min Gnt=3.Max Lat=8.
I/O at 0xff80.
Bus 0, device 11, function 0:
SCSI storage controller: Adaptec AIC-7881U (rev 0).
Medium devsel. Fast back-to-back capable. IRQ 9. Master Capable. Latency=64. Min Gnt=8.Max Lat=8.
I/O at 0xfc00.
Non-prefetchable 32 bit memory at 0xffbeb000.
Bus 0, device 7, function 1:
IDE interface: Intel 82371SB Natoma/Triton II PIIX3 (rev 0).
Medium devsel. Fast back-to-back capable. Master Capable. Latency=64.
I/O at 0xffa0.
Bus 0, device 7, function 0:
ISA bridge: Intel 82371SB Natoma/Triton II PIIX3 (rev 1).
Medium devsel. Fast back-to-back capable. Master Capable. No bursts.
Bus 0, device 0, function 0:
Host bridge: Intel 82441FX Natoma (rev 2).
Medium devsel. Fast back-to-back capable. Master Capable. Latency=64.

and the Adaptec aic7xxx driver does request_irq(9, SA_INTERRUPT | SA_SHIRQ),
and then the 3Com 3c59x driver does request_irq(9, SA_SHIRQ).

Since the SA_INTERRUPT flag differs between the two, the second one fails.
This results in no network :-(.
There are three possible fixes:
- Add SA_INTERRUPT to the 3c59x irq handler (looks like a bad idea, as it
has a bottom half that it wants to wake up)
- Remove SA_INTERRUPT from the aic7xxx irq handler (but then it won't be
atomic against other interrupts - is this a race condition?)
- Kludge the kernel arch/i386/kernel/irq.c to be able to cope with both
somehow.

I currently have #2 (apparently) working, but I'm worried about race
conditions.

Some advice as to direction would be appreciated. This gets into some pretty
subtle bottom-half issues.

-- 
	-Colin