diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-06-22 19:18:54 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-24 02:15:26 -0400 |
commit | de8d28b16f5614aeb12bb69c8f9a38578b8d3ada (patch) | |
tree | 152f0930dc099606342e9cc6d9a3892cd9f3f192 /drivers/net/tulip | |
parent | 765b5f32730cfd2608291e679060b0391570c8b3 (diff) |
[SPARC64]: Convert sparc64 PCI layer to in-kernel device tree.
One thing this change pointed out was that we really should
pull the "get 'local-mac-address' property" logic into a helper
function all the network drivers can call.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r-- | drivers/net/tulip/tulip_core.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index cabdf894e21e..e0de66739a42 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -1550,10 +1550,14 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, | |||
1550 | dev->dev_addr[i] = last_phys_addr[i]; | 1550 | dev->dev_addr[i] = last_phys_addr[i]; |
1551 | dev->dev_addr[i] = last_phys_addr[i] + 1; | 1551 | dev->dev_addr[i] = last_phys_addr[i] + 1; |
1552 | #if defined(__sparc__) | 1552 | #if defined(__sparc__) |
1553 | if ((pcp != NULL) && prom_getproplen(pcp->prom_node, | 1553 | if (pcp) { |
1554 | "local-mac-address") == 6) { | 1554 | unsigned char *addr; |
1555 | prom_getproperty(pcp->prom_node, "local-mac-address", | 1555 | int len; |
1556 | dev->dev_addr, 6); | 1556 | |
1557 | addr = of_get_property(pcp->prom_node, | ||
1558 | "local-mac-address", &len); | ||
1559 | if (addr && len == 6) | ||
1560 | memcpy(dev->dev_addr, addr, 6); | ||
1557 | } | 1561 | } |
1558 | #endif | 1562 | #endif |
1559 | #if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */ | 1563 | #if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */ |