Subject: Problems with ath(4) and interrupt sharing
To: None <>
From: Brian Buhrow <>
List: port-i386
Date: 11/16/2007 18:32:18
	Hello. I've been trying to use my Atheros wireless card with NetBSD-4
using the ath(4) driver.  What I've found is that although the card works
fine, it does not play nice with the sound card which shares its interrupt.
Specifically, the ath(4) driver eats interrupts destined for the sound
card, causing the sound card to become nonfunctional until the ath(4)
device is turned off with an ifconfig down.
	In looking at the ath driver source code, I find I have a couple of
questions in ath_intr() in src/sys/dev/ic/ath.c
Here's the snippet, with my questions below that.

    810      if ((ifp->if_flags & (IFF_RUNNING|IFF_UP)) != (IFF_RUNNING|IFF_UP))
    811           DPRINTF(sc, ATH_DEBUG_ANY, "%s: if_flags 0x%x\n",
    812                __func__, ifp->if_flags);
    813           ath_hal_getisr(ah, &status);  /* clear ISR */
    814           ath_hal_intrset(ah, 0);       /* disable further intr's */
    815           return 1; /* XXX */
    816      }

My questions are:

1.  Does the call to ath_hal_intrset() disable the device from generating
interupts, or does it disable the interrupts from being acted upon,
regardless of which device on that interrupt generated them?