mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-19 17:11:03 +00:00
sfp: fix non-detection of PHY
[ Upstream commit20b56ed9f8
] 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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1a6610de8c
commit
639dab36ed
1 changed files with 4 additions and 4 deletions
|
@ -318,12 +318,12 @@ static void sfp_sm_probe_phy(struct sfp *sfp)
|
|||
msleep(T_PHY_RESET_MS);
|
||||
|
||||
phy = mdiobus_scan(sfp->i2c_mii, SFP_PHY_ADDR);
|
||||
if (IS_ERR(phy)) {
|
||||
dev_err(sfp->dev, "mdiobus scan returned %ld\n", PTR_ERR(phy));
|
||||
if (phy == ERR_PTR(-ENODEV)) {
|
||||
dev_info(sfp->dev, "no PHY detected\n");
|
||||
return;
|
||||
}
|
||||
if (!phy) {
|
||||
dev_info(sfp->dev, "no PHY detected\n");
|
||||
if (IS_ERR(phy)) {
|
||||
dev_err(sfp->dev, "mdiobus scan returned %ld\n", PTR_ERR(phy));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue