diff options
author | cg <cg@FreeBSD.org> | 2000-01-05 00:39:20 +0000 |
---|---|---|
committer | cg <cg@FreeBSD.org> | 2000-01-05 00:39:20 +0000 |
commit | 33c444231e26dc615f79c2cd23beecbeb4aad505 (patch) | |
tree | e361611a4e50b0164417670ee7b9b7f2031405a8 | |
parent | 42026f70c270b564f3855d44f7a6bc01c797bd1c (diff) | |
download | FreeBSD-src-33c444231e26dc615f79c2cd23beecbeb4aad505.zip FreeBSD-src-33c444231e26dc615f79c2cd23beecbeb4aad505.tar.gz |
allocate isa bounce buffers of the right size for ess/mss cards, fixes
panics reported
-rw-r--r-- | sys/dev/sound/isa/mss.c | 4 | ||||
-rw-r--r-- | sys/dev/sound/isa/sb.c | 6 | ||||
-rw-r--r-- | sys/dev/sound/isa/sb16.c | 6 | ||||
-rw-r--r-- | sys/dev/sound/isa/sb8.c | 6 |
4 files changed, 14 insertions, 8 deletions
diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c index 17ec66e..8f02d45 100644 --- a/sys/dev/sound/isa/mss.c +++ b/sys/dev/sound/isa/mss.c @@ -313,12 +313,12 @@ mss_alloc_resources(struct mss_info *mss, device_t dev) if (ok) { mss->pdma = rman_get_start(mss->drq1); isa_dma_acquire(mss->pdma); - isa_dmainit(mss->pdma, DSP_BUFFSIZE); + isa_dmainit(mss->pdma, MSS_BUFFSIZE); mss->bd_flags &= ~BD_F_DUPLEX; if (mss->drq2) { mss->rdma = rman_get_start(mss->drq2); isa_dma_acquire(mss->rdma); - isa_dmainit(mss->rdma, DSP_BUFFSIZE); + isa_dmainit(mss->rdma, MSS_BUFFSIZE); mss->bd_flags |= BD_F_DUPLEX; } else mss->rdma = mss->pdma; } diff --git a/sys/dev/sound/isa/sb.c b/sys/dev/sound/isa/sb.c index 12aced9..1b501a40 100644 --- a/sys/dev/sound/isa/sb.c +++ b/sys/dev/sound/isa/sb.c @@ -418,12 +418,14 @@ sb_alloc_resources(struct sb_info *sb, device_t dev) RF_ACTIVE); if (sb->io_base && sb->drq1 && sb->irq) { + int bs = (sb->bd_flags & BD_F_ESS)? ESS_BUFFSIZE : DSP_BUFFSIZE; + isa_dma_acquire(rman_get_start(sb->drq1)); - isa_dmainit(rman_get_start(sb->drq1), DSP_BUFFSIZE); + isa_dmainit(rman_get_start(sb->drq1), bs); if (sb->drq2) { isa_dma_acquire(rman_get_start(sb->drq2)); - isa_dmainit(rman_get_start(sb->drq2), DSP_BUFFSIZE); + isa_dmainit(rman_get_start(sb->drq2), bs); } return 0; diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c index 12aced9..1b501a40 100644 --- a/sys/dev/sound/isa/sb16.c +++ b/sys/dev/sound/isa/sb16.c @@ -418,12 +418,14 @@ sb_alloc_resources(struct sb_info *sb, device_t dev) RF_ACTIVE); if (sb->io_base && sb->drq1 && sb->irq) { + int bs = (sb->bd_flags & BD_F_ESS)? ESS_BUFFSIZE : DSP_BUFFSIZE; + isa_dma_acquire(rman_get_start(sb->drq1)); - isa_dmainit(rman_get_start(sb->drq1), DSP_BUFFSIZE); + isa_dmainit(rman_get_start(sb->drq1), bs); if (sb->drq2) { isa_dma_acquire(rman_get_start(sb->drq2)); - isa_dmainit(rman_get_start(sb->drq2), DSP_BUFFSIZE); + isa_dmainit(rman_get_start(sb->drq2), bs); } return 0; diff --git a/sys/dev/sound/isa/sb8.c b/sys/dev/sound/isa/sb8.c index 12aced9..1b501a40 100644 --- a/sys/dev/sound/isa/sb8.c +++ b/sys/dev/sound/isa/sb8.c @@ -418,12 +418,14 @@ sb_alloc_resources(struct sb_info *sb, device_t dev) RF_ACTIVE); if (sb->io_base && sb->drq1 && sb->irq) { + int bs = (sb->bd_flags & BD_F_ESS)? ESS_BUFFSIZE : DSP_BUFFSIZE; + isa_dma_acquire(rman_get_start(sb->drq1)); - isa_dmainit(rman_get_start(sb->drq1), DSP_BUFFSIZE); + isa_dmainit(rman_get_start(sb->drq1), bs); if (sb->drq2) { isa_dma_acquire(rman_get_start(sb->drq2)); - isa_dmainit(rman_get_start(sb->drq2), DSP_BUFFSIZE); + isa_dmainit(rman_get_start(sb->drq2), bs); } return 0; |