summaryrefslogtreecommitdiffstats
path: root/sys/boot/ofw
diff options
context:
space:
mode:
authorbenno <benno@FreeBSD.org>2001-08-26 07:07:47 +0000
committerbenno <benno@FreeBSD.org>2001-08-26 07:07:47 +0000
commitd24e31398c55d3394db669e091aaa4e8fe4bd0a1 (patch)
treecf5f731bf53baccd6375153b078270811ed0f0c4 /sys/boot/ofw
parent4a3aed6fb1ebdcf495c6c3dab756ba08770430e6 (diff)
downloadFreeBSD-src-d24e31398c55d3394db669e091aaa4e8fe4bd0a1.zip
FreeBSD-src-d24e31398c55d3394db669e091aaa4e8fe4bd0a1.tar.gz
Pass NULL instead of MAXPHYS to the DMA allocation method. Be a bit more
verbose if we fail to allocate the DMA buffer.
Diffstat (limited to 'sys/boot/ofw')
-rw-r--r--sys/boot/ofw/libofw/ofw_net.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/boot/ofw/libofw/ofw_net.c b/sys/boot/ofw/libofw/ofw_net.c
index 6340508..11c8dab 100644
--- a/sys/boot/ofw/libofw/ofw_net.c
+++ b/sys/boot/ofw/libofw/ofw_net.c
@@ -203,9 +203,11 @@ ofwn_init(struct iodesc *desc, void *machdep_hint)
printf("ofwn_init: OpenFirmware instance handle: %08x\n", netinstance);
#endif
- if (OF_call_method("dma-alloc", netinstance, 1, 1, MAXPHYS, &dmabuf)
- == -1)
+ if (OF_call_method("dma-alloc", netinstance, 1, 1, NULL, &dmabuf)
+ < 0) {
+ printf("Failed to allocate DMA buffer (got %08x).\n", dmabuf);
goto punt;
+ }
#if defined(NETIF_DEBUG)
printf("ofwn_init: allocated DMA buffer: %08x\n", dmabuf);
OpenPOWER on IntegriCloud