From patchwork Wed Dec 21 09:49:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Crispin X-Patchwork-Id: 707705 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tk90R74LGz9t0G for ; Wed, 21 Dec 2016 20:51:35 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cJdWs-0004z8-3O; Wed, 21 Dec 2016 09:49:46 +0000 Received: from nbd.name ([2a01:4f8:131:30e2::2]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cJdWk-0004tN-GY for lede-dev@lists.infradead.org; Wed, 21 Dec 2016 09:49:41 +0000 From: John Crispin To: lede-dev@lists.infradead.org Date: Wed, 21 Dec 2016 10:49:13 +0100 Message-Id: <1482313753-30432-1-git-send-email-john@phrozen.org> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161221_014938_813454_2048DAF9 X-CRM114-Status: GOOD ( 10.65 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH] kernel: drop 702-phy_add_aneg_done_function.patch X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Crispin MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- .../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 -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 ---- - 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 -