net: bcmgenet: Fetch MAC address from the adapter
authorJeremy Linton <jeremy.linton@arm.com>
Mon, 24 Feb 2020 22:54:02 +0000 (16:54 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Feb 2020 23:31:23 +0000 (15:31 -0800)
commit26bd9cc64fafe3e84a601220162465ed72cdfc89
treec2950efad006ab70b810414903d3a7ec767bcd38
parent99c6b06a37d4cab118c45448fef9d28df62d35d8
net: bcmgenet: Fetch MAC address from the adapter

ARM/ACPI machines should utilize self describing hardware
when possible. The MAC address on the BCMGENET can be
read from the adapter if a full featured firmware has already
programmed it. Lets try using the address already programmed,
if it appears to be valid.

It should be noted that while we move the macaddr logic below
the clock and power logic in the driver, none of that code will
ever be active in an ACPI environment as the device will be
attached to the acpi power domain, and brought to full power
with all clocks enabled immediately before the device probe
routine is called.

One side effect of the above tweak is that while its now
possible to read the MAC address via _DSD properties, it should
be avoided.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c