Commit f0528ce7 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

net: greth: use phy_read_status()

In case the greth driver is bound to anything but the Generic PHY
driver or the PHY has a special read_status callback implemented,
unexpected things will happen. Make sure we that we use
phy_read_status() which does the proper abstraction of calling the
driver specific read_status() callback for a given PHY.
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2613f95f
...@@ -1361,7 +1361,7 @@ static int greth_mdio_init(struct greth_private *greth) ...@@ -1361,7 +1361,7 @@ static int greth_mdio_init(struct greth_private *greth)
timeout = jiffies + 6*HZ; timeout = jiffies + 6*HZ;
while (!phy_aneg_done(greth->phy) && time_before(jiffies, timeout)) { while (!phy_aneg_done(greth->phy) && time_before(jiffies, timeout)) {
} }
genphy_read_status(greth->phy); phy_read_status(greth->phy);
greth_link_change(greth->netdev); greth_link_change(greth->netdev);
} }
......
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