[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191218200831.13796-2-m.grzeschik@pengutronix.de>
Date: Wed, 18 Dec 2019 21:08:28 +0100
From: Michael Grzeschik <m.grzeschik@...gutronix.de>
To: andrew@...n.ch
Cc: f.fainelli@...il.com, netdev@...r.kernel.org, davem@...emloft.net,
kernel@...gutronix.de
Subject: [PATCH v2 1/4] micrel: fix config_aneg for ksz886x
The third port of the ksz886x is fixed to be connected to the
cpu. This port has no possibility to do auto negotiation.
Signed-off-by: Michael Grzeschik <m.grzeschik@...gutronix.de>
---
drivers/net/phy/micrel.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 63dedec0433de..913a8b68da350 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -841,6 +841,16 @@ static int ksz8873mll_config_aneg(struct phy_device *phydev)
return 0;
}
+static int ksz886x_config_aneg(struct phy_device *phydev)
+{
+ if (phydev->mdio.addr == 3) {
+ phydev->autoneg = AUTONEG_DISABLE;
+ genphy_read_status(phydev);
+ }
+
+ return genphy_config_aneg(phydev);
+}
+
static int kszphy_get_sset_count(struct phy_device *phydev)
{
return ARRAY_SIZE(kszphy_hw_stats);
@@ -1171,6 +1181,7 @@ static struct phy_driver ksphy_driver[] = {
.name = "Micrel KSZ886X Switch",
/* PHY_BASIC_FEATURES */
.config_init = kszphy_config_init,
+ .config_aneg = ksz886x_config_aneg,
.suspend = genphy_suspend,
.resume = genphy_resume,
}, {
--
2.24.0
Powered by blists - more mailing lists