Mercurial > illumos > illumos-gate
changeset 10289:5b71405fc453
6862065 System freezes after build 111b
author | Garrett D'Amore <gdamore@opensolaris.org> |
---|---|
date | Mon, 10 Aug 2009 16:36:38 -0700 |
parents | b8d3a3ad018d |
children | ecc1578c5db2 |
files | usr/src/uts/common/io/audio/drv/audiovia823x/audiovia823x.c |
diffstat | 1 files changed, 9 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/audio/drv/audiovia823x/audiovia823x.c Mon Aug 10 11:41:07 2009 -0400 +++ b/usr/src/uts/common/io/audio/drv/audiovia823x/audiovia823x.c Mon Aug 10 16:36:38 2009 -0700 @@ -203,9 +203,9 @@ { auvia_devc_t *devc = (void *)argp; auvia_portc_t *portc; - uint32_t gstat; uint8_t status; unsigned intrs = 0; + boolean_t claimed = B_FALSE; _NOTE(ARGUNUSED(nocare)); @@ -215,12 +215,6 @@ return (DDI_INTR_UNCLAIMED); } - gstat = INL(devc, devc->base + REG_GSTAT); - if (gstat == 0) { - mutex_exit(&devc->mutex); - return (DDI_INTR_UNCLAIMED); - } - for (int i = 0; i < AUVIA_NUM_PORTC; i++) { portc = devc->portc[i]; @@ -242,13 +236,18 @@ if (portc->started) { intrs |= (1U << i); } - /* XXX: do we really need to do this? */ + /* let the chip know we are acking the interrupt */ OUTB(devc, portc->base + OFF_STATUS, status); + + claimed = B_TRUE; } - OUTL(devc, devc->base + REG_GSTAT, gstat); + mutex_exit(&devc->mutex); - mutex_exit(&devc->mutex); + if (!claimed) { + return (DDI_INTR_UNCLAIMED); + } + if (intrs & (1U << AUVIA_PLAY_SGD_NUM)) { audio_engine_consume(devc->portc[AUVIA_PLAY_SGD_NUM]->engine); }