net: altera_tse: explicitly disable autoscan on the regmap-mdio bus
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Wed, 7 Jun 2023 13:59:40 +0000 (15:59 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 7 Jun 2023 20:30:12 +0000 (13:30 -0700)
Set the .autoscan flag to false on the regmap-mdio bus, to avoid using a
random uninitialized value. We don't want autoscan in this case as the
mdio device is a PCS and not a PHY.

Fixes: db48abbaa18e ("net: ethernet: altera-tse: Convert to mdio-regmap and use PCS Lynx")
Suggested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/altera/altera_tse_main.c

index 215f9fb89c5be0b0d363925fa1a0fca254ca667a..2e15800e53102fefa22880ed7131c93de09f5b17 100644 (file)
@@ -1288,6 +1288,7 @@ static int altera_tse_probe(struct platform_device *pdev)
        mrc.regmap = pcs_regmap;
        mrc.parent = &pdev->dev;
        mrc.valid_addr = 0x0;
+       mrc.autoscan = false;
 
        /* Rx IRQ */
        priv->rx_irq = platform_get_irq_byname(pdev, "rx_irq");