summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/isa/mss.c
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2004-10-13 05:45:16 +0000
committeryongari <yongari@FreeBSD.org>2004-10-13 05:45:16 +0000
commit5cef8d8d2948198fbbb2185df7d8670a4d32cee8 (patch)
tree84265f45d61673c001f7a05d3b7e52b74cfa21df /sys/dev/sound/isa/mss.c
parent4da86ae4d224739a308aa280b2d3ef4609e76201 (diff)
downloadFreeBSD-src-5cef8d8d2948198fbbb2185df7d8670a4d32cee8.zip
FreeBSD-src-5cef8d8d2948198fbbb2185df7d8670a4d32cee8.tar.gz
Audio drivers failed to detect failure condition and attempted to
assign DMA address to the wrong address. It can cause system lockup or other mysterious errors. Since most sound cards requires low DMA address(BUS_SPACE_MAXADDR_24BIT) sndbuf_alloc() would fail when the audio driver is loaded after long running of operations. Approved by: jake (mentor) Reviewed by: truckman, matk
Diffstat (limited to 'sys/dev/sound/isa/mss.c')
-rw-r--r--sys/dev/sound/isa/mss.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c
index d03f7b8..3473766 100644
--- a/sys/dev/sound/isa/mss.c
+++ b/sys/dev/sound/isa/mss.c
@@ -1131,7 +1131,8 @@ msschan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *
ch->channel = c;
ch->buffer = b;
ch->dir = dir;
- if (sndbuf_alloc(ch->buffer, mss->parent_dmat, mss->bufsize) == -1) return NULL;
+ if (sndbuf_alloc(ch->buffer, mss->parent_dmat, mss->bufsize) != 0)
+ return NULL;
sndbuf_dmasetup(ch->buffer, (dir == PCMDIR_PLAY)? mss->drq1 : mss->drq2);
return ch;
}
OpenPOWER on IntegriCloud