OSDN Git Service

tg3: optionally use eth_platform_get_mac_address() to get mac address
authorthesven73@gmail.com <thesven73@gmail.com>
Sat, 17 Nov 2018 15:56:18 +0000 (10:56 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 18 Nov 2018 20:57:59 +0000 (12:57 -0800)
commitcddaf02bcb7313a23b06e46683a1381b85840687
tree093edc802db27d252fb51ae4c2b22e4ace9c1127
parent80cc49507ba48f85929f499734e4dbe2d50ecdf8
tg3: optionally use eth_platform_get_mac_address() to get mac address

This function will try to determine the mac address via the devicetree,
or via an architecture-specific method (e.g. a PROM on SPARC).

The SPARC-specific code in this driver (#ifdef SPARC) did exactly this,
and is therefore removed.

Note that you can now specify the tg3 mac address via the devicetree,
on any platform, not just SPARC:

Devicetree example:
(see Documentation/devicetree/bindings/pci/pci.txt)

&pcie {
host@0 {
#address-cells = <3>;
#size-cells = <2>;
reg = <0 0 0 0 0>;
bcm5778: bcm5778@0 {
reg = <0 0 0 0 0>;
mac-address = [CA 11 AB 1E 10 01];
};
};
};

Signed-off-by: Sven Van Asbroeck <svendev@arcx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c