1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-26 17:47:29 +02:00
openwrt/target/linux/generic/patches-4.4/702-phy_add_aneg_done_function.patch
Etienne Haarsma 7f3dab2fc3 kernel: bump 4.4 to 4.4.102
Refreshed all patches.

Removed upstream ramips patch: 0063-set-CM_GCR_BASE_CMDEFTGT_MEM-according-to-datasheet.patch

Compile-tested: ar71xx
Run-tested: ar71xx

Signed-off-by: Etienne Haarsma <bladeoner112@gmail.com>
Tested-by: Stijn Segers <francesco.borromini@inventati.org>
2017-11-26 15:10:36 +01:00

28 lines
735 B
Diff

--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -497,6 +497,12 @@ struct phy_driver {
/* Determines the negotiated speed and duplex */
int (*read_status)(struct phy_device *phydev);
+ /*
+ * Update the value in phydev->link to reflect the
+ * current link value
+ */
+ int (*update_link)(struct phy_device *phydev);
+
/* Clears any pending interrupts */
int (*ack_interrupt)(struct phy_device *phydev);
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -995,6 +995,9 @@ int genphy_update_link(struct phy_device
{
int status;
+ if (phydev->drv->update_link)
+ return phydev->drv->update_link(phydev);
+
/* Do a fake read */
status = phy_read(phydev, MII_BMSR);
if (status < 0)