diff options
author | nyan <nyan@FreeBSD.org> | 2004-07-08 13:48:49 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2004-07-08 13:48:49 +0000 |
commit | c6183ca7fabf1a1bf92632ad3e13d8ffbc1a6c4f (patch) | |
tree | 7770d5e68ad038686ca2a37b1beca9017babd20f /sys/pc98 | |
parent | 8ada288b80767765d9bc7ee58c88bfd6be817be7 (diff) | |
download | FreeBSD-src-c6183ca7fabf1a1bf92632ad3e13d8ffbc1a6c4f.zip FreeBSD-src-c6183ca7fabf1a1bf92632ad3e13d8ffbc1a6c4f.tar.gz |
MFi386: revision 1.16.
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/cbus/cbus_dma.c | 16 | ||||
-rw-r--r-- | sys/pc98/pc98/isa_dma.c | 16 |
2 files changed, 30 insertions, 2 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; diff --git a/sys/pc98/pc98/isa_dma.c b/sys/pc98/pc98/isa_dma.c index 4dbe414..e9d4604 100644 --- a/sys/pc98/pc98/isa_dma.c +++ b/sys/pc98/pc98/isa_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; |