diff options
| author | Cameron Grant <cg@FreeBSD.org> | 2000-01-10 06:19:20 +0000 |
|---|---|---|
| committer | Cameron Grant <cg@FreeBSD.org> | 2000-01-10 06:19:20 +0000 |
| commit | 10b23f4c02c15779c7c490996dbfe87cd06c44bd (patch) | |
| tree | 9573dc61f06c336df2fd67140b5af2c11b9a33b9 /sys/dev/sound | |
| parent | 82af5353b069bba7a516739631df1ce2231f5304 (diff) | |
Notes
Diffstat (limited to 'sys/dev/sound')
| -rw-r--r-- | sys/dev/sound/pci/neomagic.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/sound/pci/neomagic.c b/sys/dev/sound/pci/neomagic.c index 8bfba53d324c1..d18820e90fda1 100644 --- a/sys/dev/sound/pci/neomagic.c +++ b/sys/dev/sound/pci/neomagic.c @@ -428,10 +428,11 @@ static void nm_intr(void *p) { struct sc_info *sc = (struct sc_info *)p; - int status, x; + int status, x, active; + active = (sc->pch.channel->buffer.dl || sc->rch.channel->buffer.dl); status = nm_rd(sc, NM_INT_REG, sc->irsz); - if (status == 0) { + if (status == 0 && active) { if (sc->badintr++ > 1000) { device_printf(sc->dev, "1000 bad intrs\n"); sc->badintr = 0; @@ -506,7 +507,7 @@ nm_init(struct sc_info *sc) sc->recint = NM2_RECORD_INT; sc->misc1int = NM2_MISC_INT_1; sc->misc2int = NM2_MISC_INT_2; - } + } else return -1; sc->badintr = 0; ofs = sc->buftop - 0x0400; sc->buftop -= 0x1400; |
