Message ID | 20230606152501.328789-5-maxime.chevallier@bootlin.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Followup fixes for the dwmac and altera lynx conversion | expand |
On Tue, Jun 06, 2023 at 05:25:00PM +0200, Maxime Chevallier wrote: > 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> > --- > V2->V3 : New patch > > drivers/net/ethernet/altera/altera_tse_main.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c > index df509abcd378..b0cb94fe6247 100644 > --- a/drivers/net/ethernet/altera/altera_tse_main.c > +++ b/drivers/net/ethernet/altera/altera_tse_main.c > @@ -1287,6 +1287,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; ah so there was uninited value on mrc :) can you please zero this out in one of the patches? > > /* Rx IRQ */ > priv->rx_irq = platform_get_irq_byname(pdev, "rx_irq"); > -- > 2.40.1 > >
diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c index df509abcd378..b0cb94fe6247 100644 --- a/drivers/net/ethernet/altera/altera_tse_main.c +++ b/drivers/net/ethernet/altera/altera_tse_main.c @@ -1287,6 +1287,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");
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> --- V2->V3 : New patch drivers/net/ethernet/altera/altera_tse_main.c | 1 + 1 file changed, 1 insertion(+)