1 --- a/include/linux/phy.h
2 +++ b/include/linux/phy.h
3 @@ -393,9 +393,18 @@ struct phy_driver {
5 int (*config_aneg)(struct phy_device *phydev);
7 + /* Determine if autonegotiation is done */
8 + int (*aneg_done)(struct phy_device *phydev);
10 /* Determines the negotiated speed and duplex */
11 int (*read_status)(struct phy_device *phydev);
14 + * Update the value in phydev->link to reflect the
15 + * current link value
17 + int (*update_link)(struct phy_device *phydev);
19 /* Clears any pending interrupts */
20 int (*ack_interrupt)(struct phy_device *phydev);
22 --- a/drivers/net/phy/phy_device.c
23 +++ b/drivers/net/phy/phy_device.c
24 @@ -695,6 +695,9 @@ int genphy_update_link(struct phy_device
28 + if (phydev->drv->update_link)
29 + return phydev->drv->update_link(phydev);
32 status = phy_read(phydev, MII_BMSR);
34 --- a/drivers/net/phy/phy.c
35 +++ b/drivers/net/phy/phy.c
36 @@ -107,6 +107,9 @@ static inline int phy_aneg_done(struct p
40 + if (phydev->drv->aneg_done)
41 + return phydev->drv->aneg_done(phydev);
43 retval = phy_read(phydev, MII_BMSR);
45 return (retval < 0) ? retval : (retval & BMSR_ANEGCOMPLETE);