diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2019-02-05 20:41:37 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-06 19:46:49 -0800 |
commit | a6e11f6bbd29a92d1357c2f3033a70fb1b767432 (patch) | |
tree | f0a684d83cb537dbfbd6106bf48c1d97339e2dd9 /drivers/net/phy/marvell10g.c | |
parent | 7d8e249f393a1aca30bde876e932401d2c78bc9f (diff) | |
download | linux-stable-a6e11f6bbd29a92d1357c2f3033a70fb1b767432.tar.gz linux-stable-a6e11f6bbd29a92d1357c2f3033a70fb1b767432.tar.bz2 linux-stable-a6e11f6bbd29a92d1357c2f3033a70fb1b767432.zip |
net: phy: improve genphy_c45_read_link
Let's make genphy_c45_read_link behave the same as genphy_update_link
and set phydev->link in the function directly. This allows to simplify
the callers. In addition don't check further devices once we detect
that at least one device reports link as down.
v2:
- remove an unused variable
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/marvell10g.c')
-rw-r--r-- | drivers/net/phy/marvell10g.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c index 5531f9cabc63..296a537cdfcb 100644 --- a/drivers/net/phy/marvell10g.c +++ b/drivers/net/phy/marvell10g.c @@ -457,8 +457,6 @@ static int mv3310_read_status(struct phy_device *phydev) if (val < 0) return val; - phydev->link = val > 0 ? 1 : 0; - val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_STAT1); if (val < 0) return val; |