On 22:03 Wed 14 Nov , Jean-Christophe PLAGNIOL-VILLARD wrote: > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> > --- this will detect that the phy was jsut notified that the link is up Best Regards, J. > drivers/net/phy/phy.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c > index 43738c2..daa657f 100644 > --- a/drivers/net/phy/phy.c > +++ b/drivers/net/phy/phy.c > @@ -578,6 +578,18 @@ int genphy_read_status(struct phy_device *phydev) > if (lpa < 0) > return lpa; > > + if (lpa & LPA_LPACK) { > + int ret; > + > + ret = phy_aneg_done(phydev); > + if (ret) > + return ret; > + > + lpa = phy_read(phydev, MII_LPA); > + if (lpa < 0) > + return lpa; > + } > + > adv = phy_read(phydev, MII_ADVERTISE); > > if (adv < 0) > -- > 1.7.10.4 > _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox