aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2002-02-23 04:31:30 +0000
committerJake Burkholder <jake@FreeBSD.org>2002-02-23 04:31:30 +0000
commitc2ef11f24432e9f38ec96fe23dd56fb5c65feb8d (patch)
tree4a1057a9da8065c3c8c5e78b01ff5310796c808f
parent0c7065ad98620ac545bbb481a6c2f6cbf5d21841 (diff)
Notes
-rw-r--r--sys/boot/ofw/libofw/ofw_net.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/boot/ofw/libofw/ofw_net.c b/sys/boot/ofw/libofw/ofw_net.c
index 712a4572232b4..e14759c8a0dba 100644
--- a/sys/boot/ofw/libofw/ofw_net.c
+++ b/sys/boot/ofw/libofw/ofw_net.c
@@ -188,10 +188,14 @@ ofwn_init(struct iodesc *desc, void *machdep_hint)
chosen = OF_finddevice("/chosen");
OF_getprop(chosen, "memory", &memory, sizeof(memory));
pathlen = OF_getprop(chosen, "bootpath", path, 64);
- ch = index(path, ':');
- *ch = '\0';
+ if ((ch = index(path, ':')) != NULL)
+ *ch = '\0';
netdev = OF_finddevice(path);
+#ifdef __sparc64__
+ if (OF_getprop(netdev, "mac-address", desc->myea, 6) == -1)
+#else
if (OF_getprop(netdev, "local-mac-address", desc->myea, 6) == -1)
+#endif
goto punt;
printf("boot: ethernet address: %s\n", ether_sprintf(desc->myea));
@@ -205,6 +209,7 @@ ofwn_init(struct iodesc *desc, void *machdep_hint)
printf("ofwn_init: OpenFirmware instance handle: %08x\n", netinstance);
#endif
+#ifndef __sparc64__
if (OF_call_method("dma-alloc", netinstance, 1, 1, NULL, &dmabuf)
< 0) {
printf("Failed to allocate DMA buffer (got %08x).\n", dmabuf);
@@ -214,6 +219,7 @@ ofwn_init(struct iodesc *desc, void *machdep_hint)
#if defined(NETIF_DEBUG)
printf("ofwn_init: allocated DMA buffer: %08x\n", dmabuf);
#endif
+#endif
return;