net: stmmac: check if MAC needs to attach to a PHY
authorMichael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Thu, 30 Mar 2023 09:14:03 +0000 (17:14 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 Mar 2023 08:23:41 +0000 (09:23 +0100)
commitfe2cfbc9680356a3d9f8adde8a38e715831e32f5
tree0fa58f18b101464464cd91f808da8a4cbcf25476
parent653a180957a85c3fc30320cc7e84f5dc913a64f8
net: stmmac: check if MAC needs to attach to a PHY

After the introduction of the fixed-link support, the MAC driver
no longer attempt to scan for a PHY to attach to. This causes the
non fixed-link setups to stop working.

Using the phylink_expects_phy() to check and determine if the MAC
should expect and attach a PHY.

Fixes: ab21cf920928 ("net: stmmac: make mdio register skips PHY scanning for fixed-link")
Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Signed-off-by: Lai Peter Jun Ann <peter.jun.ann.lai@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c