[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <67d4bb9b-e88b-60e8-f696-64d0403e1910@gmail.com>
Date: Tue, 13 Aug 2019 23:26:01 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Marek Behun <marek.behun@....cz>,
David Miller <davem@...emloft.net>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: [PATCH RFC 3/4] net: phy: swphy: bind swphy to genphy driver at probe
time
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 <hkallweit1@...il.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
Powered by blists - more mailing lists