Commit 20b56ed9 authored by Russell King's avatar Russell King Committed by David S. Miller

sfp: fix non-detection of PHY

The detection of a PHY changed in commit e98a3aab ("mdio_bus: don't
return NULL from mdiobus_scan()") which now causes sfp to print an
error message.  Update for this change.

Fixes: 73970055 ("sfp: add SFP module support")
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 75e8e156
...@@ -356,12 +356,12 @@ static void sfp_sm_probe_phy(struct sfp *sfp) ...@@ -356,12 +356,12 @@ static void sfp_sm_probe_phy(struct sfp *sfp)
msleep(T_PHY_RESET_MS); msleep(T_PHY_RESET_MS);
phy = mdiobus_scan(sfp->i2c_mii, SFP_PHY_ADDR); phy = mdiobus_scan(sfp->i2c_mii, SFP_PHY_ADDR);
if (IS_ERR(phy)) { if (phy == ERR_PTR(-ENODEV)) {
dev_err(sfp->dev, "mdiobus scan returned %ld\n", PTR_ERR(phy)); dev_info(sfp->dev, "no PHY detected\n");
return; return;
} }
if (!phy) { if (IS_ERR(phy)) {
dev_info(sfp->dev, "no PHY detected\n"); dev_err(sfp->dev, "mdiobus scan returned %ld\n", PTR_ERR(phy));
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment