Subject: Re: Problems with ath(4) and interrupt sharing
To: David Laight <david@l8s.co.uk>
From: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
List: port-i386
Date: 12/09/2007 19:06:52
	Hello.  In continuing to troubleshoot this problem, I changed the
ath(4) driver to interrupt at IPL_AUDIO priority.  The result was that
things worked better, but they still break after a while.
	So, what I think is that we have two problems:

1.  If two devices, operating at different interrupt priorities, share an
interrupt, and the device at the higher interrupt priority is later in the
interrupt chain, that device will lose more interrupts than the lower
priority device, which is first in the priority chain.

2.  the auich(4) driver doesn't deal well with missing interrupts.  As a
result, when it misses an interrupt, interrupts are masked off for that
interrupt pin, causing all interupts on all devices using that pin to stop.

	It seems like #2 is the bigger problem, and if I can resolve that, #1
becomes a non-issue, except that there may still be network or audio
artifacts which occur if both are in heavy use.

	Any ideas on the best way to patch up the auich(4) driver to deal with
lost interrupts?
-thanks
-Brian

P.S.  My guess is that this hasn't been a real big issue for a lot of folks
because it seems to only happen when both devices are in heavy use.
However.  When I see the problem, the ath(4) device is generating about
150-200 interrupts/second.  I can't tell how many the audio device is
adding to the noise.
-Brian