net: bgmac: improve handling PHY
authorRafał Miłecki <rafal@milecki.pl>
Sat, 2 Oct 2021 17:58:11 +0000 (19:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Oct 2021 10:38:37 +0000 (11:38 +0100)
commitb5375509184dc23d2b7fa0c5ed8763899ccc9674
treee9242f762b8ebc1e7b5e21b3be6291bb19435a36
parentceca777dabc6ea25e13fae6498c27e187a69be0e
net: bgmac: improve handling PHY

1. Use info from DT if available

It allows describing for example a fixed link. It's more accurate than
just guessing there may be one (depending on a chipset).

2. Verify PHY ID before trying to connect PHY

PHY addr 0x1e (30) is special in Broadcom routers and means a switch
connected as MDIO devices instead of a real PHY. Don't try connecting to
it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bgmac-bcma.c