From ab648d3fa127d3df68ed3b11189fbb4a6b40727e Mon Sep 17 00:00:00 2001 From: ariff Date: Mon, 14 Nov 2005 18:18:52 +0000 Subject: Fix a long standing unhandled interrupt bug which can cause erratic system slowdown (beaten to a pulp) and possible panic. This issue has bugged me for as long as I could remember, until I realized that it is possible for register base offset to hold zero value which is definitely a "FALSE". Approved by: netchild (mentor) --- sys/dev/sound/pci/via8233.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pci/via8233.c b/sys/dev/sound/pci/via8233.c index 19e3507..8dca294 100644 --- a/sys/dev/sound/pci/via8233.c +++ b/sys/dev/sound/pci/via8233.c @@ -712,7 +712,7 @@ via_intr(void *p) /* Poll playback channels */ snd_mtxlock(via->lock); for (i = 0; i < NDXSCHANS + NMSGDCHANS; i++) { - if (via->pch[i].rbase == 0) + if (via->pch[i].channel == NULL) continue; stat = via->pch[i].rbase + VIA_RP_STATUS; if (via_rd(via, stat, 1) & SGD_STATUS_INTR) { @@ -725,7 +725,7 @@ via_intr(void *p) /* Poll record channels */ for (i = 0; i < NWRCHANS; i++) { - if (via->rch[i].rbase == 0) + if (via->rch[i].channel == NULL) continue; stat = via->rch[i].rbase + VIA_RP_STATUS; if (via_rd(via, stat, 1) & SGD_STATUS_INTR) { -- cgit v1.1