Skip to content

Commit 6d330eb

Browse files
Hans-Frieder VogtNipaLocal
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]> Signed-off-by: NipaLocal <nipa@local>
1 parent 0dc7f0e commit 6d330eb

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
@@ -199,13 +199,13 @@ int tn40_mdiobus_init(struct tn40_priv *priv)
199199
}
200200
}
201201

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

211211
err_swnodes_cleanup:

0 commit comments

Comments
 (0)