[source] ip17xx: correct aneg_done return value

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 14 09:44:30 PST 2017


jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/13a5568d6edc15338d20e279eaf7dfb271cd73b0

commit 13a5568d6edc15338d20e279eaf7dfb271cd73b0
Author: Sergey Ryazanov <ryazanov.s.a at gmail.com>
AuthorDate: Wed Jun 7 01:25:32 2017 +0300

    ip17xx: correct aneg_done return value
    
    PHY core treats any positive return value as the auto-negotiation done
    indication. Since we do not actually check any device register in this
    callback then update it to return positive value with a neutral meaning
    instead of the register flag to avoid  confusing for future readers.
    
    Signed-off-by: Sergey Ryazanov <ryazanov.s.a at gmail.com>
    (cherry picked from commit 2cc61e6e8e951b1480a024fdb66bc539aa163bbc)
---
 target/linux/generic/files/drivers/net/phy/ip17xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ip17xx.c b/target/linux/generic/files/drivers/net/phy/ip17xx.c
index a4fe53d..dbb867e 100644
--- a/target/linux/generic/files/drivers/net/phy/ip17xx.c
+++ b/target/linux/generic/files/drivers/net/phy/ip17xx.c
@@ -1334,7 +1334,7 @@ static int ip17xx_config_aneg(struct phy_device *pdev)
 
 static int ip17xx_aneg_done(struct phy_device *pdev)
 {
-	return BMSR_ANEGCOMPLETE;
+	return 1;	/* Return any positive value */
 }
 
 static int ip17xx_update_link(struct phy_device *pdev)



More information about the lede-commits mailing list