summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus/cbus_dma.c
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2004-07-08 13:48:49 +0000
committernyan <nyan@FreeBSD.org>2004-07-08 13:48:49 +0000
commitc6183ca7fabf1a1bf92632ad3e13d8ffbc1a6c4f (patch)
tree7770d5e68ad038686ca2a37b1beca9017babd20f /sys/pc98/cbus/cbus_dma.c
parent8ada288b80767765d9bc7ee58c88bfd6be817be7 (diff)
downloadFreeBSD-src-c6183ca7fabf1a1bf92632ad3e13d8ffbc1a6c4f.zip
FreeBSD-src-c6183ca7fabf1a1bf92632ad3e13d8ffbc1a6c4f.tar.gz
MFi386: revision 1.16.
Diffstat (limited to 'sys/pc98/cbus/cbus_dma.c')
-rw-r--r--sys/pc98/cbus/cbus_dma.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/pc98/cbus/cbus_dma.c b/sys/pc98/cbus/cbus_dma.c
index 4dbe414..e9d4604 100644
--- a/sys/pc98/cbus/cbus_dma.c
+++ b/sys/pc98/cbus/cbus_dma.c
@@ -130,13 +130,27 @@ isa_dmainit(chan, bouncebufsize)
{
void *buf;
+#ifndef PC98
+ /*
+ * 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;
+#endif
+
#ifdef DIAGNOSTIC
if (chan & ~VALID_DMA_MASK)
panic("isa_dmainit: channel out of range");
-
+#ifdef PC98
if (dma_bouncebuf[chan] != NULL)
panic("isa_dmainit: impossible request");
#endif
+#endif
dma_bouncebufsize[chan] = bouncebufsize;
OpenPOWER on IntegriCloud