[5/6] 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)
committerBen Hutchings <benh@debian.org>
Wed, 29 Apr 2020 03:46:47 +0000 (04:46 +0100)
commit79cc617c07552d9cd46eda71f0c0513c887ee94f
treeeb8ba5f4da31b35abdcadda2f07154336f1942ad
parentaf5805183b4561254d2388946471e6820e8cf02d
[5/6] net: bcmgenet: Fetch MAC address from the adapter

Origin: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit?id=26bd9cc64fafe3e84a601220162465ed72cdfc89
Bug-Debian: https://bugs.debian.org/950578

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>
Gbp-Pq: Topic features/all/bcmgenet
Gbp-Pq: Name 0005-net-bcmgenet-Fetch-MAC-address-from-the-adapter.patch
drivers/net/ethernet/broadcom/genet/bcmgenet.c