OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Only display areas with differencesIgnore whitespace
Rev 2 Rev 3
1 --- a/include/linux/phy.h 1 --- a/include/linux/phy.h
2 +++ b/include/linux/phy.h 2 +++ b/include/linux/phy.h
3 @@ -547,6 +547,12 @@ struct phy_driver { 3 @@ -547,6 +547,12 @@ struct phy_driver {
4 /* Determines the negotiated speed and duplex */ 4 /* Determines the negotiated speed and duplex */
5 int (*read_status)(struct phy_device *phydev); 5 int (*read_status)(struct phy_device *phydev);
6 6
7 + /* 7 + /*
8 + * Update the value in phydev->link to reflect the 8 + * Update the value in phydev->link to reflect the
9 + * current link value 9 + * current link value
10 + */ 10 + */
11 + int (*update_link)(struct phy_device *phydev); 11 + int (*update_link)(struct phy_device *phydev);
12 + 12 +
13 /* Clears any pending interrupts */ 13 /* Clears any pending interrupts */
14 int (*ack_interrupt)(struct phy_device *phydev); 14 int (*ack_interrupt)(struct phy_device *phydev);
15 15
16 --- a/drivers/net/phy/phy_device.c 16 --- a/drivers/net/phy/phy_device.c
17 +++ b/drivers/net/phy/phy_device.c 17 +++ b/drivers/net/phy/phy_device.c
18 @@ -1455,6 +1455,9 @@ int genphy_update_link(struct phy_device 18 @@ -1458,6 +1458,9 @@ int genphy_update_link(struct phy_device
19 { 19 {
20 int status; 20 int status;
21 21
22 + if (phydev->drv && phydev->drv->update_link) 22 + if (phydev->drv && phydev->drv->update_link)
23 + return phydev->drv->update_link(phydev); 23 + return phydev->drv->update_link(phydev);
24 + 24 +
25 /* Do a fake read */ 25 /* Do a fake read */
26 status = phy_read(phydev, MII_BMSR); 26 status = phy_read(phydev, MII_BMSR);
27 if (status < 0) 27 if (status < 0)
28   28