[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241221-tn9510-v3a-v4-6-dafff89ba7a7@gmx.net>
Date: Sat, 21 Dec 2024 15:43:41 +0100
From: Hans-Frieder Vogt via B4 Relay <devnull+hfdevel.gmx.net@...nel.org>
To: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
FUJITA Tomonori <fujita.tomonori@...il.com>,
Andrew Lunn <andrew+netdev@...n.ch>
Cc: netdev@...r.kernel.org, Hans-Frieder Vogt <hfdevel@....net>
Subject: [PATCH net-next v4 6/7] net: tn40xx: prepare tn40xx driver to find
phy of the TN9510 card
From: Hans-Frieder Vogt <hfdevel@....net>
Prepare the tn40xx driver to load for Tehuti TN9510 cards, which require
bit 3 in the register TN40_REG_MDIO_CMD_STAT to be set. The function of bit
3 is unclear, but may have something to do with the length of the preamble
in the MDIO communication. If bit 3 is not set, the PHY will not be found
when performing a scan for PHYs. Use the available tn40_mdio_set_speed
function which includes setting bit 3. Just move the function to before the
devm_mdio_register function, which scans the mdio bus for PHYs.
Signed-off-by: Hans-Frieder Vogt <hfdevel@....net>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Reviewed-by: FUJITA Tomonori <fujita.tomonori@...il.com>
---
drivers/net/ethernet/tehuti/tn40_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/tehuti/tn40_mdio.c b/drivers/net/ethernet/tehuti/tn40_mdio.c
index 3607ffcb2ee54e70009fdde0d59d27a9b8a88b6a..1db71cdbd09c140eeb281cfd6ae6429c72f70055 100644
--- a/drivers/net/ethernet/tehuti/tn40_mdio.c
+++ b/drivers/net/ethernet/tehuti/tn40_mdio.c
@@ -199,13 +199,13 @@ int tn40_mdiobus_init(struct tn40_priv *priv)
}
}
+ tn40_mdio_set_speed(priv, TN40_MDIO_SPEED_6MHZ);
ret = devm_mdiobus_register(&pdev->dev, bus);
if (ret) {
dev_err(&pdev->dev, "failed to register mdiobus %d %u %u\n",
ret, bus->state, MDIOBUS_UNREGISTERED);
goto err_swnodes_cleanup;
}
- tn40_mdio_set_speed(priv, TN40_MDIO_SPEED_6MHZ);
return 0;
err_swnodes_cleanup:
--
2.45.2
Powered by blists - more mailing lists