summaryrefslogtreecommitdiff
path: root/sys/dev/isa
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-06-08 00:41:11 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-06-08 00:41:11 +0000
commitf949939a181d3eef16ecccfe9b01d4c0b4e27402 (patch)
treefe1cddaafd0cb1c9e8838db07aa39952895fe824 /sys/dev/isa
parentc4f99f26f462a5a120fb5550bd9066421f3b57ea (diff)
Do not hardcode the dma channel to 1, use the softc settings instead.
mickey@ ok
Diffstat (limited to 'sys/dev/isa')
-rw-r--r--sys/dev/isa/ad1848.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/isa/ad1848.c b/sys/dev/isa/ad1848.c
index 0adb6cd76d2..db11e21acca 100644
--- a/sys/dev/isa/ad1848.c
+++ b/sys/dev/isa/ad1848.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ad1848.c,v 1.28 2003/04/27 11:22:53 ho Exp $ */
+/* $OpenBSD: ad1848.c,v 1.29 2003/06/08 00:41:10 miod Exp $ */
/* $NetBSD: ad1848.c,v 1.45 1998/01/30 02:02:38 augustss Exp $ */
/*
@@ -1648,8 +1648,14 @@ ad1848_malloc(addr, direction, size, pool, flags)
int flags;
{
struct ad1848_softc *sc = addr;
+ int drq;
- return isa_malloc(sc->sc_isa, 1, size, pool, flags);
+ if (sc->sc_mode == AUMODE_RECORD)
+ drq = sc->sc_recdrq == -1 ? sc->sc_drq : sc->sc_recdrq;
+ else
+ drq = sc->sc_drq;
+
+ return isa_malloc(sc->sc_isa, drq, size, pool, flags);
}
void