diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-25 06:44:44 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-25 06:44:44 -0400 |
commit | 76a9f26c9e40e9c0ed5dc8f0cedd74e733f0088d (patch) | |
tree | 8e2db4ba9263e92d264ef469c7dac28078f63874 /drivers/net/sungem.c | |
parent | 9bf2aa129a107a0e9e2a5318d35aca731ae7e666 (diff) | |
parent | dfd8317d3340f03bc06eba6b58f0ec0861da4a13 (diff) |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'drivers/net/sungem.c')
-rw-r--r-- | drivers/net/sungem.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 38cd30cb7c75..5248670d29f7 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -2880,17 +2880,20 @@ static int __devinit gem_get_device_address(struct gem *gp) | |||
2880 | #if defined(__sparc__) | 2880 | #if defined(__sparc__) |
2881 | struct pci_dev *pdev = gp->pdev; | 2881 | struct pci_dev *pdev = gp->pdev; |
2882 | struct pcidev_cookie *pcp = pdev->sysdata; | 2882 | struct pcidev_cookie *pcp = pdev->sysdata; |
2883 | int node = -1; | 2883 | int use_idprom = 1; |
2884 | 2884 | ||
2885 | if (pcp != NULL) { | 2885 | if (pcp != NULL) { |
2886 | node = pcp->prom_node; | 2886 | unsigned char *addr; |
2887 | if (prom_getproplen(node, "local-mac-address") == 6) | 2887 | int len; |
2888 | prom_getproperty(node, "local-mac-address", | 2888 | |
2889 | dev->dev_addr, 6); | 2889 | addr = of_get_property(pcp->prom_node, "local-mac-address", |
2890 | else | 2890 | &len); |
2891 | node = -1; | 2891 | if (addr && len == 6) { |
2892 | use_idprom = 0; | ||
2893 | memcpy(dev->dev_addr, addr, 6); | ||
2894 | } | ||
2892 | } | 2895 | } |
2893 | if (node == -1) | 2896 | if (use_idprom) |
2894 | memcpy(dev->dev_addr, idprom->id_ethaddr, 6); | 2897 | memcpy(dev->dev_addr, idprom->id_ethaddr, 6); |
2895 | #elif defined(CONFIG_PPC_PMAC) | 2898 | #elif defined(CONFIG_PPC_PMAC) |
2896 | unsigned char *addr; | 2899 | unsigned char *addr; |