[3/6] net: bcmgenet: enable automatic phy discovery
authorJeremy Linton <jeremy.linton@arm.com>
Mon, 24 Feb 2020 22:54:00 +0000 (16:54 -0600)
committerSalvatore Bonaccorso <carnil@debian.org>
Sat, 23 May 2020 14:29:21 +0000 (15:29 +0100)
commit2136cf9b64e205f52bf0d5bdd7a5513dafa6e1a2
tree1b65baa0d0507d76bf1de49019ee5356388c59db
parent17174d9a3b5797f92c23dee33bc27ccc6280beff
[3/6] net: bcmgenet: enable automatic phy discovery

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

The unimac mdio driver falls back to scanning the
entire bus if its given an appropriate mask. In ACPI
mode we expect that the system is well behaved and
conforms to recent versions of the specification.

We then utilize phy_find_first(), and
phy_connect_direct() to find and attach to the
discovered phy during net_device open. While its
apparently possible to build a genet based device
with multiple phys on a single mdio bus, this works
for current machines. Further, this driver makes
a number of assumptions about the platform device,
mac, mdio and phy all being 1:1. Lastly, It also
avoids having to create references across the ACPI
namespace hierarchy.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Gbp-Pq: Topic features/all/bcmgenet
Gbp-Pq: Name 0003-net-bcmgenet-enable-automatic-phy-discovery.patch
drivers/net/ethernet/broadcom/genet/bcmmii.c