mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 22:42:10 +00:00
sfp: fix non-detection of PHY
The detection of a PHY changed in commite98a3aabf8
("mdio_bus: don't return NULL from mdiobus_scan()") which now causes sfp to print an error message. Update for this change. Fixes:7397005545
("sfp: add SFP module support") Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
75e8e15635
commit
20b56ed9f8
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue