The kernel provides a link_change_notify callback these days, making the patch obselete. Drop the patch and make its only user use the new API.
Signed-off-by: John Crispin <j...@phrozen.org> --- .../linux/generic/files/drivers/net/phy/ip17xx.c | 4 +- .../702-phy_add_aneg_done_function.patch | 27 ------------ .../702-phy_add_aneg_done_function.patch | 27 ------------ .../702-phy_add_aneg_done_function.patch | 46 -------------------- 4 files changed, 2 insertions(+), 102 deletions(-) delete mode 100644 target/linux/generic/patches-3.18/702-phy_add_aneg_done_function.patch delete mode 100644 target/linux/generic/patches-4.1/702-phy_add_aneg_done_function.patch delete mode 100644 target/linux/generic/patches-4.4/702-phy_add_aneg_done_function.patch diff --git a/target/linux/generic/files/drivers/net/phy/ip17xx.c b/target/linux/generic/files/drivers/net/phy/ip17xx.c index a4fe53d..f9bab27 100644 --- a/target/linux/generic/files/drivers/net/phy/ip17xx.c +++ b/target/linux/generic/files/drivers/net/phy/ip17xx.c @@ -1363,7 +1363,7 @@ static struct phy_driver ip17xx_driver = { .config_init = ip17xx_config_init, .config_aneg = ip17xx_config_aneg, .aneg_done = ip17xx_aneg_done, - .update_link = ip17xx_update_link, + .link_change_notify = ip17xx_update_link, .read_status = ip17xx_read_status, .driver = { .owner = THIS_MODULE }, }; @@ -1378,7 +1378,7 @@ static struct phy_driver ip175a_driver = { .config_init = ip17xx_config_init, .config_aneg = ip17xx_config_aneg, .aneg_done = ip17xx_aneg_done, - .update_link = ip17xx_update_link, + .link_change_notify = ip17xx_update_link, .read_status = ip17xx_read_status, .driver = { .owner = THIS_MODULE }, }; diff --git a/target/linux/generic/patches-3.18/702-phy_add_aneg_done_function.patch b/target/linux/generic/patches-3.18/702-phy_add_aneg_done_function.patch deleted file mode 100644 index d20fc04..0000000 --- a/target/linux/generic/patches-3.18/702-phy_add_aneg_done_function.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/include/linux/phy.h -+++ b/include/linux/phy.h -@@ -484,6 +484,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 -@@ -915,6 +915,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) diff --git a/target/linux/generic/patches-4.1/702-phy_add_aneg_done_function.patch b/target/linux/generic/patches-4.1/702-phy_add_aneg_done_function.patch deleted file mode 100644 index c743cef..0000000 --- a/target/linux/generic/patches-4.1/702-phy_add_aneg_done_function.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/include/linux/phy.h -+++ b/include/linux/phy.h -@@ -489,6 +489,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 -@@ -929,6 +929,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) diff --git a/target/linux/generic/patches-4.4/702-phy_add_aneg_done_function.patch b/target/linux/generic/patches-4.4/702-phy_add_aneg_done_function.patch deleted file mode 100644 index 849f41b..0000000 --- a/target/linux/generic/patches-4.4/702-phy_add_aneg_done_function.patch +++ /dev/null @@ -1,46 +0,0 @@ -From ce768ea7b98eac64adfc9e44ed103399f7cfe436 Mon Sep 17 00:00:00 2001 -From: Gabor Juhos <juh...@openwrt.org> -Date: Tue, 20 Dec 2016 10:54:58 +0100 -Subject: [PATCH 193/243] net: phy: add aneg_done and update_link functions - for the phy_device - -Signed-off-by: Gabor Juhos <juh...@openwrt.org> ---- - drivers/net/phy/phy_device.c | 3 +++ - include/linux/phy.h | 6 ++++++ - 2 files changed, 9 insertions(+) - -diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c -index 0bfbaba..fb92ad3 100644 ---- 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 *phydev) - { - 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) -diff --git a/include/linux/phy.h b/include/linux/phy.h -index d3602a3..924e92e 100644 ---- a/include/linux/phy.h -+++ b/include/linux/phy.h -@@ -501,6 +501,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); - --- -1.7.10.4 - -- 1.7.10.4 _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev