Subject: Interrupt sharing
To: netbsd-macppc <port-macppc@NetBSD.ORG>
From: Michael <macallan18@earthlink.net>
List: port-macppc
Date: 12/05/2004 15:46:15
Hello,

I have the following problem:
all PCI devices behind the PCI bridge in my S900 share the same interrupt ( more or less because Apple tied interrupts to PCI slots and the bridge sits in one ). In my case that's an USB controller (ohci) and a Yamaha audio card (yds). Each one alone works fine, but things get awry when both are busy at the same time, like playing some music and fsck'ing a USB disk ( or moving the mouse for a while ) - then all processing for the shared IRQ stops. Other interrupts aren't affected, only the shared one. 
After some hacking I found this:
- the audio chip seems to generate a lot of interrupts, they queue up every couple of seconds 
- the pending mechanism seems to work fine, the IRQ gets disabled, the pending flags are set and in do_pending_int() it's enabled again. 
- when things lock up the IRQ is enabled, marked as pending and apparently gets processed but then it either doesn't fire again or doesn't get processed.

I think there's a race somewhere - it looks like the shared interrupt gets processed but not always cleared so it doesn't fire again.

have fun
Michael