提交 96ebc3bf 编写于 作者: S Scott Wood 提交者: Paul Mackerras

[POWERPC] bootwrapper: Only print MAC addresses when the node is actually present

Some firmwares (such as PlanetCore) only provide a base MAC address, and
expect the kernel to set certain bits to generate the addresses for the
other ports.  As such, MAC addresses are generated that may not correspond
to actual hardware.
Signed-off-by: NScott Wood <scottwood@freescale.com>
Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 21f3fe2f
...@@ -100,12 +100,14 @@ void __dt_fixup_mac_addresses(u32 startindex, ...) ...@@ -100,12 +100,14 @@ void __dt_fixup_mac_addresses(u32 startindex, ...)
devp = find_node_by_prop_value(NULL, "linux,network-index", devp = find_node_by_prop_value(NULL, "linux,network-index",
(void*)&index, sizeof(index)); (void*)&index, sizeof(index));
printf("ENET%d: local-mac-address <-" if (devp) {
" %02x:%02x:%02x:%02x:%02x:%02x\n\r", index, printf("ENET%d: local-mac-address <-"
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
addr[0], addr[1], addr[2],
addr[3], addr[4], addr[5]);
if (devp)
setprop(devp, "local-mac-address", addr, 6); setprop(devp, "local-mac-address", addr, 6);
}
index++; index++;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册