Skip to content

Commit 07cfe3a

Browse files
Hans-Frieder Vogtkuba-moo
authored andcommitted
net: tn40xx: prepare tn40xx driver to find phy of the TN9510 card
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 <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: FUJITA Tomonori <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 25b6a6d commit 07cfe3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/tehuti/tn40_mdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,13 @@ int tn40_mdiobus_init(struct tn40_priv *priv)
200200
}
201201
}
202202

203+
tn40_mdio_set_speed(priv, TN40_MDIO_SPEED_6MHZ);
203204
ret = devm_mdiobus_register(&pdev->dev, bus);
204205
if (ret) {
205206
dev_err(&pdev->dev, "failed to register mdiobus %d %u %u\n",
206207
ret, bus->state, MDIOBUS_UNREGISTERED);
207208
goto err_swnodes_cleanup;
208209
}
209-
tn40_mdio_set_speed(priv, TN40_MDIO_SPEED_6MHZ);
210210
return 0;
211211

212212
err_swnodes_unregister:

0 commit comments

Comments
 (0)