summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2004-08-16 22:51:13 +0000
committerpeter <peter@FreeBSD.org>2004-08-16 22:51:13 +0000
commit2800cddd5fac766f4fafb2bff990cf4ad0f6a559 (patch)
tree937796fa4fa0eb301f41e5a49360a0f9b5972cf4 /sys/amd64/isa
parentefc85186f06a07dcadd5d6e69cdfe77a2a3e3398 (diff)
downloadFreeBSD-src-2800cddd5fac766f4fafb2bff990cf4ad0f6a559.zip
FreeBSD-src-2800cddd5fac766f4fafb2bff990cf4ad0f6a559.tar.gz
Sync with i386
Diffstat (limited to 'sys/amd64/isa')
-rw-r--r--sys/amd64/isa/isa_dma.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/amd64/isa/isa_dma.c b/sys/amd64/isa/isa_dma.c
index b6400dd..2017158 100644
--- a/sys/amd64/isa/isa_dma.c
+++ b/sys/amd64/isa/isa_dma.c
@@ -103,12 +103,20 @@ isa_dmainit(chan, bouncebufsize)
{
void *buf;
+ /*
+ * If a DMA channel is shared, both drivers have to call isa_dmainit
+ * since they don't know that the other driver will do it.
+ * Just return if we're already set up good.
+ * XXX: this only works if they agree on the bouncebuf size. This
+ * XXX: is typically the case since they are multiple instances of
+ * XXX: the same driver.
+ */
+ if (dma_bouncebuf[chan] != NULL)
+ return;
+
#ifdef DIAGNOSTIC
if (chan & ~VALID_DMA_MASK)
panic("isa_dmainit: channel out of range");
-
- if (dma_bouncebuf[chan] != NULL)
- panic("isa_dmainit: impossible request");
#endif
dma_bouncebufsize[chan] = bouncebufsize;
OpenPOWER on IntegriCloud