diff options
author | phk <phk@FreeBSD.org> | 2004-09-15 12:09:50 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-09-15 12:09:50 +0000 |
commit | 1795816cf766cbe770384eb50bb559e0d9fba2a6 (patch) | |
tree | 56e89a43c4b2e1186b0edeeb3e43382456e0543e /sys/isa | |
parent | fe0362c5d20c4b60c70d896778b722b144ded3ed (diff) | |
download | FreeBSD-src-1795816cf766cbe770384eb50bb559e0d9fba2a6.zip FreeBSD-src-1795816cf766cbe770384eb50bb559e0d9fba2a6.tar.gz |
Add new a function isa_dma_init() which returns an errno when it fails
and which takes a M_WAITOK/M_NOWAIT flag argument.
Add compatibility isa_dmainit() macro which whines loudly if
isa_dma_init() fails.
Problem uncovered by: tegge
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/isavar.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/isa/isavar.h b/sys/isa/isavar.h index 5a7621e..811a721 100644 --- a/sys/isa/isavar.h +++ b/sys/isa/isavar.h @@ -160,13 +160,19 @@ extern void isa_probe_children(device_t dev); extern void isa_dmacascade(int chan); extern void isa_dmadone(int flags, caddr_t addr, int nbytes, int chan); -extern void isa_dmainit(int chan, u_int bouncebufsize); +extern int isa_dma_init(int chan, u_int bouncebufsize, int flag); extern void isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan); extern int isa_dma_acquire(int chan); extern void isa_dma_release(int chan); extern int isa_dmastatus(int chan); extern int isa_dmastop(int chan); +#define isa_dmainit(chan, size) do { \ + if (isa_dma_init(chan, size, M_NOWAIT)) \ + printf("WARNING: isa_dma_init(%d, %ju) failed\n", \ + (int)(chan), (uintmax_t)(size)); \ + } while (0) + int isab_attach(device_t dev); #ifdef PC98 |