Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sound/pci/hda/hdac.c
Show First 20 Lines • Show All 378 Lines • ▼ Show 20 Lines | hdac_intr_handler(void *context) | ||||
* It is plausible that hardware interrupts a host only when GIS goes | * It is plausible that hardware interrupts a host only when GIS goes | ||||
* from zero to one. GIS is formed by OR-ing multiple hardware | * from zero to one. GIS is formed by OR-ing multiple hardware | ||||
* statuses, so it's possible that a previously cleared status gets set | * statuses, so it's possible that a previously cleared status gets set | ||||
* again while another status has not been cleared yet. Thus, there | * again while another status has not been cleared yet. Thus, there | ||||
* will be no new interrupt as GIS always stayed set. If we don't | * will be no new interrupt as GIS always stayed set. If we don't | ||||
* re-examine GIS then we can leave it set and never get an interrupt | * re-examine GIS then we can leave it set and never get an interrupt | ||||
* again. | * again. | ||||
*/ | */ | ||||
intsts = HDAC_READ_4(&sc->mem, HDAC_INTSTS); | |||||
while ((intsts & HDAC_INTSTS_GIS) != 0) { | |||||
hdac_lock(sc); | hdac_lock(sc); | ||||
intsts = HDAC_READ_4(&sc->mem, HDAC_INTSTS); | |||||
while (intsts != 0xffffffff && (intsts & HDAC_INTSTS_GIS) != 0) { | |||||
hdac_one_intr(sc, intsts); | hdac_one_intr(sc, intsts); | ||||
hdac_unlock(sc); | |||||
intsts = HDAC_READ_4(&sc->mem, HDAC_INTSTS); | intsts = HDAC_READ_4(&sc->mem, HDAC_INTSTS); | ||||
} | } | ||||
hdac_unlock(sc); | |||||
} | } | ||||
static void | static void | ||||
hdac_poll_callback(void *arg) | hdac_poll_callback(void *arg) | ||||
{ | { | ||||
struct hdac_softc *sc = arg; | struct hdac_softc *sc = arg; | ||||
if (sc == NULL) | if (sc == NULL) | ||||
▲ Show 20 Lines • Show All 1,774 Lines • Show Last 20 Lines |