Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=96ebc3bfb6ddedd5a400d5653b50551d5a3de439
Commit:     96ebc3bfb6ddedd5a400d5653b50551d5a3de439
Parent:     21f3fe2f7ab57832ea1fc7f719ec7e167b7ad80e
Author:     Scott Wood <[EMAIL PROTECTED]>
AuthorDate: Thu Sep 6 05:21:18 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Sep 14 01:33:23 2007 +1000

    [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: Scott Wood <[EMAIL PROTECTED]>
    Acked-by: David Gibson <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/devtree.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/boot/devtree.c b/arch/powerpc/boot/devtree.c
index e1b8122..549463b 100644
--- a/arch/powerpc/boot/devtree.c
+++ b/arch/powerpc/boot/devtree.c
@@ -100,12 +100,14 @@ void __dt_fixup_mac_addresses(u32 startindex, ...)
                devp = find_node_by_prop_value(NULL, "linux,network-index",
                                               (void*)&index, sizeof(index));
 
-               printf("ENET%d: local-mac-address <-"
-                      " %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
-                      addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
+               if (devp) {
+                       printf("ENET%d: local-mac-address <-"
+                              " %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);
+               }
 
                index++;
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to