]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitbb75e4456d71238a91155f6a829f9d15b4a6c170
treee9242f762b8ebc1e7b5e21b3be6291bb19435a36
parentca3b06f7598dff3c2de81748b18a8fde1eb0ca78
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