mirror of
https://github.com/torvalds/linux.git
synced 2026-09-15 15:01:08 -04:00
[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>
This commit is contained in:
@@ -1550,10 +1550,14 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
|
||||
dev->dev_addr[i] = last_phys_addr[i];
|
||||
dev->dev_addr[i] = last_phys_addr[i] + 1;
|
||||
#if defined(__sparc__)
|
||||
if ((pcp != NULL) && prom_getproplen(pcp->prom_node,
|
||||
"local-mac-address") == 6) {
|
||||
prom_getproperty(pcp->prom_node, "local-mac-address",
|
||||
dev->dev_addr, 6);
|
||||
if (pcp) {
|
||||
unsigned char *addr;
|
||||
int len;
|
||||
|
||||
addr = of_get_property(pcp->prom_node,
|
||||
"local-mac-address", &len);
|
||||
if (addr && len == 6)
|
||||
memcpy(dev->dev_addr, addr, 6);
|
||||
}
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */
|
||||
|
||||
Reference in New Issue
Block a user