1000BaseT SFP modules typically include an Ethernet PHY device, and
while the Generic PHY driver will be able to bind to it, it usually will
not work at all without a specialized PHY driver. Issue a warning in
that case to help toubleshoot things.

Signed-off-by: Florian Fainelli <f.faine...@gmail.com>
---
 drivers/net/phy/sfp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index fd8bb998ae52..228205d8ce84 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -1203,6 +1203,9 @@ static void sfp_sm_probe_phy(struct sfp *sfp)
        }
 
        sfp->mod_phy = phy;
+       if (phy_driver_is_genphy(phy) || phy_driver_is_genphy_10g(phy))
+               dev_warn(sfp->dev, "Using Generic PHY driver with a SFP!\n");
+
        phy_start(phy);
 }
 
-- 
2.17.1

Reply via email to