Let a swphy bind to the genphy driver at probe time. This provides automatic feature detection even if the swphy never gets attached to a net_device. So far the genphy driver binds to a PHY as fallback only once the PHY is attached to a net_device.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com> --- drivers/net/phy/swphy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/swphy.c b/drivers/net/phy/swphy.c index 53c214a22..7ac5054fa 100644 --- a/drivers/net/phy/swphy.c +++ b/drivers/net/phy/swphy.c @@ -151,8 +151,9 @@ int swphy_read_reg(int reg, const struct fixed_phy_status *state) case MII_BMSR: return bmsr; case MII_PHYSID1: + return GENPHY_ID_HIGH; case MII_PHYSID2: - return 0; + return GENPHY_ID_LOW; case MII_LPA: return lpa; case MII_STAT1000: -- 2.22.0