aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sound/pci/hda/hdac.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sound/pci/hda/hdac.c')
-rw-r--r--sys/dev/sound/pci/hda/hdac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c
index c7f5e9dd5b5c..4988a1a28fa2 100644
--- a/sys/dev/sound/pci/hda/hdac.c
+++ b/sys/dev/sound/pci/hda/hdac.c
@@ -384,13 +384,13 @@ hdac_intr_handler(void *context)
* re-examine GIS then we can leave it set and never get an interrupt
* again.
*/
+ hdac_lock(sc);
intsts = HDAC_READ_4(&sc->mem, HDAC_INTSTS);
- while ((intsts & HDAC_INTSTS_GIS) != 0) {
- hdac_lock(sc);
+ while (intsts != 0xffffffff && (intsts & HDAC_INTSTS_GIS) != 0) {
hdac_one_intr(sc, intsts);
- hdac_unlock(sc);
intsts = HDAC_READ_4(&sc->mem, HDAC_INTSTS);
}
+ hdac_unlock(sc);
}
static void