mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
net: altera-tse: Don't use netdev name for the PCS mdio bus
The PCS mdio bus must be created before registering the net_device. To do that, we musn't depend on the netdev name to create the mdio bus name. Let's use the device's name instead. Note that this changes the bus name in /sys/bus/mdiobus Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20251103104928.58461-4-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
dd2619d38d
commit
9350ea63fe
@@ -1404,7 +1404,7 @@ static int altera_tse_probe(struct platform_device *pdev)
|
||||
(unsigned long) control_port->start, priv->rx_irq,
|
||||
priv->tx_irq);
|
||||
|
||||
snprintf(mrc.name, MII_BUS_ID_SIZE, "%s-pcs-mii", ndev->name);
|
||||
snprintf(mrc.name, MII_BUS_ID_SIZE, "%s-pcs-mii", dev_name(&pdev->dev));
|
||||
pcs_bus = devm_mdio_regmap_register(&pdev->dev, &mrc);
|
||||
if (IS_ERR(pcs_bus)) {
|
||||
ret = PTR_ERR(pcs_bus);
|
||||
|
||||
Reference in New Issue
Block a user