All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/5] Followup fixes for the dwmac and altera lynx conversion
@ 2023-06-06 15:24 ` Maxime Chevallier
  0 siblings, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2023-06-06 15:24 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, alexis.lothore,
	thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
	Paolo Abeni, Florian Fainelli, Heiner Kallweit, Russell King,
	Vladimir Oltean, Ioana Ciornei, linux-stm32, linux-arm-kernel,
	Maxime Coquelin, Jose Abreu, Alexandre Torgue,
	Giuseppe Cavallaro, Simon Horman

Hello everyone,

Here's another version of the cleanup series for the TSE PCS replacement
by PCS Lynx. It includes Kconfig fixups, some missing initialisations
and a slight rework suggested by Russell for the dwmac cleanup sequence.

V2->V3 :
 - Fix uninitialized .autoscan field for mdio regmap configuration in
   both altera_tse and dwmac_socfpga
V1->V2 : 
 - Fix a Kconfig inconsistency
 - rework the dwmac_socfpga cleanup sequence

Maxime Chevallier (5):
  net: altera-tse: Initialize the regmap_config struct before using it
  net: altera_tse: Use the correct Kconfig option for the PCS_LYNX
    dependency
  net: stmmac: make the pcs_lynx cleanup sequence specific to
    dwmac_socfpga
  net: altera_tse: explicitly disable autoscan on the regmap-mdio bus
  net: dwmac_socfpga: explicitly disable autoscan on the regmap-mdio bus

 drivers/net/ethernet/altera/Kconfig               |  2 +-
 drivers/net/ethernet/altera/altera_tse_main.c     |  2 ++
 drivers/net/ethernet/stmicro/stmmac/common.h      |  1 -
 .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c   | 15 ++++++++++++++-
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c |  3 ---
 5 files changed, 17 insertions(+), 6 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH net-next v3 0/5] Followup fixes for the dwmac and altera lynx conversion
@ 2023-06-06 15:24 ` Maxime Chevallier
  0 siblings, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2023-06-06 15:24 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, alexis.lothore,
	thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
	Paolo Abeni, Florian Fainelli, Heiner Kallweit, Russell King,
	Vladimir Oltean, Ioana Ciornei, linux-stm32, linux-arm-kernel,
	Maxime Coquelin, Jose Abreu, Alexandre Torgue,
	Giuseppe Cavallaro, Simon Horman

Hello everyone,

Here's another version of the cleanup series for the TSE PCS replacement
by PCS Lynx. It includes Kconfig fixups, some missing initialisations
and a slight rework suggested by Russell for the dwmac cleanup sequence.

V2->V3 :
 - Fix uninitialized .autoscan field for mdio regmap configuration in
   both altera_tse and dwmac_socfpga
V1->V2 : 
 - Fix a Kconfig inconsistency
 - rework the dwmac_socfpga cleanup sequence

Maxime Chevallier (5):
  net: altera-tse: Initialize the regmap_config struct before using it
  net: altera_tse: Use the correct Kconfig option for the PCS_LYNX
    dependency
  net: stmmac: make the pcs_lynx cleanup sequence specific to
    dwmac_socfpga
  net: altera_tse: explicitly disable autoscan on the regmap-mdio bus
  net: dwmac_socfpga: explicitly disable autoscan on the regmap-mdio bus

 drivers/net/ethernet/altera/Kconfig               |  2 +-
 drivers/net/ethernet/altera/altera_tse_main.c     |  2 ++
 drivers/net/ethernet/stmicro/stmmac/common.h      |  1 -
 .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c   | 15 ++++++++++++++-
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c |  3 ---
 5 files changed, 17 insertions(+), 6 deletions(-)

-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH net-next v3 1/5] net: altera-tse: Initialize the regmap_config struct before using it
  2023-06-06 15:24 ` Maxime Chevallier
@ 2023-06-06 15:24   ` Maxime Chevallier
  -1 siblings, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2023-06-06 15:24 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, alexis.lothore,
	thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
	Paolo Abeni, Florian Fainelli, Heiner Kallweit, Russell King,
	Vladimir Oltean, Ioana Ciornei, linux-stm32, linux-arm-kernel,
	Maxime Coquelin, Jose Abreu, Alexandre Torgue,
	Giuseppe Cavallaro, Simon Horman

The regmap_config needs to be zeroed before using it. This will cause
spurious errors at probe time as config->pad_bits is containing random
uninitialized data.

Fixes: db48abbaa18e ("net: ethernet: altera-tse: Convert to mdio-regmap and use PCS Lynx")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
V2->V3 : No changes
V1->V2 : No changes

 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 d866c0f1b503..df509abcd378 100644
--- a/drivers/net/ethernet/altera/altera_tse_main.c
+++ b/drivers/net/ethernet/altera/altera_tse_main.c
@@ -1255,6 +1255,7 @@ static int altera_tse_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_free_netdev;
 
+	memset(&pcs_regmap_cfg, 0, sizeof(pcs_regmap_cfg));
 	/* SGMII PCS address space. The location can vary depending on how the
 	 * IP is integrated. We can have a resource dedicated to it at a specific
 	 * address space, but if it's not the case, we fallback to the mdiophy0
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next v3 1/5] net: altera-tse: Initialize the regmap_config struct before using it
@ 2023-06-06 15:24   ` Maxime Chevallier
  0 siblings, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2023-06-06 15:24 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, alexis.lothore,
	thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
	Paolo Abeni, Florian Fainelli, Heiner Kallweit, Russell King,
	Vladimir Oltean, Ioana Ciornei, linux-stm32, linux-arm-kernel,
	Maxime Coquelin, Jose Abreu, Alexandre Torgue,
	Giuseppe Cavallaro, Simon Horman

The regmap_config needs to be zeroed before using it. This will cause
spurious errors at probe time as config->pad_bits is containing random
uninitialized data.

Fixes: db48abbaa18e ("net: ethernet: altera-tse: Convert to mdio-regmap and use PCS Lynx")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
V2->V3 : No changes
V1->V2 : No changes

 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 d866c0f1b503..df509abcd378 100644
--- a/drivers/net/ethernet/altera/altera_tse_main.c
+++ b/drivers/net/ethernet/altera/altera_tse_main.c
@@ -1255,6 +1255,7 @@ static int altera_tse_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_free_netdev;
 
+	memset(&pcs_regmap_cfg, 0, sizeof(pcs_regmap_cfg));
 	/* SGMII PCS address space. The location can vary depending on how the
 	 * IP is integrated. We can have a resource dedicated to it at a specific
 	 * address space, but if it's not the case, we fallback to the mdiophy0
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next v3 2/5] net: altera_tse: Use the correct Kconfig option for the PCS_LYNX dependency
  2023-06-06 15:24 ` Maxime Chevallier
@ 2023-06-06 15:24   ` Maxime Chevallier
  -1 siblings, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2023-06-06 15:24 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, alexis.lothore,
	thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
	Paolo Abeni, Florian Fainelli, Heiner Kallweit, Russell King,
	Vladimir Oltean, Ioana Ciornei, linux-stm32, linux-arm-kernel,
	Maxime Coquelin, Jose Abreu, Alexandre Torgue,
	Giuseppe Cavallaro, Simon Horman

Use the correct Kconfig dependency for altera_tse as PCS_ALTERA_TSE was
replaced by PCS_LYNX.

Fixes: db48abbaa18e ("net: ethernet: altera-tse: Convert to mdio-regmap and use PCS Lynx")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
V2->V3 : Fix a typo in the commit title
V1->V2 : New patch

 drivers/net/ethernet/altera/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/altera/Kconfig b/drivers/net/ethernet/altera/Kconfig
index 93533ba03429..17985319088c 100644
--- a/drivers/net/ethernet/altera/Kconfig
+++ b/drivers/net/ethernet/altera/Kconfig
@@ -4,7 +4,7 @@ config ALTERA_TSE
 	depends on HAS_DMA
 	select PHYLIB
 	select PHYLINK
-	select PCS_ALTERA_TSE
+	select PCS_LYNX
 	select MDIO_REGMAP
 	select REGMAP_MMIO
 	help
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next v3 2/5] net: altera_tse: Use the correct Kconfig option for the PCS_LYNX dependency
@ 2023-06-06 15:24   ` Maxime Chevallier
  0 siblings, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2023-06-06 15:24 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, alexis.lothore,
	thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
	Paolo Abeni, Florian Fainelli, Heiner Kallweit, Russell King,
	Vladimir Oltean, Ioana Ciornei, linux-stm32, linux-arm-kernel,
	Maxime Coquelin, Jose Abreu, Alexandre Torgue,
	Giuseppe Cavallaro, Simon Horman

Use the correct Kconfig dependency for altera_tse as PCS_ALTERA_TSE was
replaced by PCS_LYNX.

Fixes: db48abbaa18e ("net: ethernet: altera-tse: Convert to mdio-regmap and use PCS Lynx")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
V2->V3 : Fix a typo in the commit title
V1->V2 : New patch

 drivers/net/ethernet/altera/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/altera/Kconfig b/drivers/net/ethernet/altera/Kconfig
index 93533ba03429..17985319088c 100644
--- a/drivers/net/ethernet/altera/Kconfig
+++ b/drivers/net/ethernet/altera/Kconfig
@@ -4,7 +4,7 @@ config ALTERA_TSE
 	depends on HAS_DMA
 	select PHYLIB
 	select PHYLINK
-	select PCS_ALTERA_TSE
+	select PCS_LYNX
 	select MDIO_REGMAP
 	select REGMAP_MMIO
 	help
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next v3 3/5] net: stmmac: make the pcs_lynx cleanup sequence specific to dwmac_socfpga
  2023-06-06 15:24 ` Maxime Chevallier
@ 2023-06-06 15:24   ` Maxime Chevallier
  -1 siblings, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2023-06-06 15:24 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, alexis.lothore,
	thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
	Paolo Abeni, Florian Fainelli, Heiner Kallweit, Russell King,
	Vladimir Oltean, Ioana Ciornei, linux-stm32, linux-arm-kernel,
	Maxime Coquelin, Jose Abreu, Alexandre Torgue,
	Giuseppe Cavallaro, Simon Horman, Russell King

So far, only the dwmac_socfpga variant of stmmac uses PCS Lynx. Use a
dedicated cleanup sequence for dwmac_socfpga instead of using the
generic stmmac one.

Fixes: 5d1f3fe7d2d5 ("net: stmmac: dwmac-sogfpga: use the lynx pcs driver")
Suggested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
V2->V3 : Removed extra whiteline
V1->V2 : New patch

 drivers/net/ethernet/stmicro/stmmac/common.h       |  1 -
 .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c    | 14 +++++++++++++-
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c  |  3 ---
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
index 52c5ec553276..16e67c18b6f7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -16,7 +16,6 @@
 #include <linux/stmmac.h>
 #include <linux/phy.h>
 #include <linux/pcs/pcs-xpcs.h>
-#include <linux/pcs-lynx.h>
 #include <linux/module.h>
 #if IS_ENABLED(CONFIG_VLAN_8021Q)
 #define STMMAC_VLAN_TAG_USED
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index e399fccbafe5..1fb808be843b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -11,6 +11,7 @@
 #include <linux/phy.h>
 #include <linux/regmap.h>
 #include <linux/mdio/mdio-regmap.h>
+#include <linux/pcs-lynx.h>
 #include <linux/reset.h>
 #include <linux/stmmac.h>
 
@@ -494,6 +495,17 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
 	return ret;
 }
 
+static void socfpga_dwmac_remove(struct platform_device *pdev)
+{
+	struct net_device *ndev = platform_get_drvdata(pdev);
+	struct stmmac_priv *priv = netdev_priv(ndev);
+	struct phylink_pcs *pcs = priv->hw->lynx_pcs;
+
+	stmmac_pltfr_remove(pdev);
+
+	lynx_pcs_destroy(pcs);
+}
+
 #ifdef CONFIG_PM_SLEEP
 static int socfpga_dwmac_resume(struct device *dev)
 {
@@ -565,7 +577,7 @@ MODULE_DEVICE_TABLE(of, socfpga_dwmac_match);
 
 static struct platform_driver socfpga_dwmac_driver = {
 	.probe  = socfpga_dwmac_probe,
-	.remove_new = stmmac_pltfr_remove,
+	.remove_new = socfpga_dwmac_remove,
 	.driver = {
 		.name           = "socfpga-dwmac",
 		.pm		= &socfpga_dwmac_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index c784a6731f08..3db1cb0fd160 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -665,9 +665,6 @@ int stmmac_mdio_unregister(struct net_device *ndev)
 	if (priv->hw->xpcs)
 		xpcs_destroy(priv->hw->xpcs);
 
-	if (priv->hw->lynx_pcs)
-		lynx_pcs_destroy(priv->hw->lynx_pcs);
-
 	mdiobus_unregister(priv->mii);
 	priv->mii->priv = NULL;
 	mdiobus_free(priv->mii);
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next v3 3/5] net: stmmac: make the pcs_lynx cleanup sequence specific to dwmac_socfpga
@ 2023-06-06 15:24   ` Maxime Chevallier
  0 siblings, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2023-06-06 15:24 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, alexis.lothore,
	thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
	Paolo Abeni, Florian Fainelli, Heiner Kallweit, Russell King,
	Vladimir Oltean, Ioana Ciornei, linux-stm32, linux-arm-kernel,
	Maxime Coquelin, Jose Abreu, Alexandre Torgue,
	Giuseppe Cavallaro, Simon Horman, Russell King

So far, only the dwmac_socfpga variant of stmmac uses PCS Lynx. Use a
dedicated cleanup sequence for dwmac_socfpga instead of using the
generic stmmac one.

Fixes: 5d1f3fe7d2d5 ("net: stmmac: dwmac-sogfpga: use the lynx pcs driver")
Suggested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
V2->V3 : Removed extra whiteline
V1->V2 : New patch

 drivers/net/ethernet/stmicro/stmmac/common.h       |  1 -
 .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c    | 14 +++++++++++++-
 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c  |  3 ---
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
index 52c5ec553276..16e67c18b6f7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -16,7 +16,6 @@
 #include <linux/stmmac.h>
 #include <linux/phy.h>
 #include <linux/pcs/pcs-xpcs.h>
-#include <linux/pcs-lynx.h>
 #include <linux/module.h>
 #if IS_ENABLED(CONFIG_VLAN_8021Q)
 #define STMMAC_VLAN_TAG_USED
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index e399fccbafe5..1fb808be843b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -11,6 +11,7 @@
 #include <linux/phy.h>
 #include <linux/regmap.h>
 #include <linux/mdio/mdio-regmap.h>
+#include <linux/pcs-lynx.h>
 #include <linux/reset.h>
 #include <linux/stmmac.h>
 
@@ -494,6 +495,17 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
 	return ret;
 }
 
+static void socfpga_dwmac_remove(struct platform_device *pdev)
+{
+	struct net_device *ndev = platform_get_drvdata(pdev);
+	struct stmmac_priv *priv = netdev_priv(ndev);
+	struct phylink_pcs *pcs = priv->hw->lynx_pcs;
+
+	stmmac_pltfr_remove(pdev);
+
+	lynx_pcs_destroy(pcs);
+}
+
 #ifdef CONFIG_PM_SLEEP
 static int socfpga_dwmac_resume(struct device *dev)
 {
@@ -565,7 +577,7 @@ MODULE_DEVICE_TABLE(of, socfpga_dwmac_match);
 
 static struct platform_driver socfpga_dwmac_driver = {
 	.probe  = socfpga_dwmac_probe,
-	.remove_new = stmmac_pltfr_remove,
+	.remove_new = socfpga_dwmac_remove,
 	.driver = {
 		.name           = "socfpga-dwmac",
 		.pm		= &socfpga_dwmac_pm_ops,
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index c784a6731f08..3db1cb0fd160 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -665,9 +665,6 @@ int stmmac_mdio_unregister(struct net_device *ndev)
 	if (priv->hw->xpcs)
 		xpcs_destroy(priv->hw->xpcs);
 
-	if (priv->hw->lynx_pcs)
-		lynx_pcs_destroy(priv->hw->lynx_pcs);
-
 	mdiobus_unregister(priv->mii);
 	priv->mii->priv = NULL;
 	mdiobus_free(priv->mii);
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next v3 4/5] net: altera_tse: explicitly disable autoscan on the regmap-mdio bus
  2023-06-06 15:24 ` Maxime Chevallier
@ 2023-06-06 15:25   ` Maxime Chevallier
  -1 siblings, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2023-06-06 15:25 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, alexis.lothore,
	thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
	Paolo Abeni, Florian Fainelli, Heiner Kallweit, Russell King,
	Vladimir Oltean, Ioana Ciornei, linux-stm32, linux-arm-kernel,
	Maxime Coquelin, Jose Abreu, Alexandre Torgue,
	Giuseppe Cavallaro, Simon Horman, Russell King

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;
 
 	/* Rx IRQ */
 	priv->rx_irq = platform_get_irq_byname(pdev, "rx_irq");
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next v3 4/5] net: altera_tse: explicitly disable autoscan on the regmap-mdio bus
@ 2023-06-06 15:25   ` Maxime Chevallier
  0 siblings, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2023-06-06 15:25 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, alexis.lothore,
	thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
	Paolo Abeni, Florian Fainelli, Heiner Kallweit, Russell King,
	Vladimir Oltean, Ioana Ciornei, linux-stm32, linux-arm-kernel,
	Maxime Coquelin, Jose Abreu, Alexandre Torgue,
	Giuseppe Cavallaro, Simon Horman, Russell King

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;
 
 	/* Rx IRQ */
 	priv->rx_irq = platform_get_irq_byname(pdev, "rx_irq");
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next v3 5/5] net: dwmac_socfpga: explicitly disable autoscan on the regmap-mdio bus
  2023-06-06 15:24 ` Maxime Chevallier
@ 2023-06-06 15:25   ` Maxime Chevallier
  -1 siblings, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2023-06-06 15:25 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, alexis.lothore,
	thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
	Paolo Abeni, Florian Fainelli, Heiner Kallweit, Russell King,
	Vladimir Oltean, Ioana Ciornei, linux-stm32, linux-arm-kernel,
	Maxime Coquelin, Jose Abreu, Alexandre Torgue,
	Giuseppe Cavallaro, Simon Horman, Russell King

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: 5d1f3fe7d2d5 ("net: stmmac: dwmac-sogfpga: use the lynx pcs driver")
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/stmicro/stmmac/dwmac-socfpga.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 1fb808be843b..e1bdf132cede 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -470,6 +470,7 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
 		mrc.regmap = pcs_regmap;
 		mrc.parent = &pdev->dev;
 		mrc.valid_addr = 0x0;
+		mrc.autoscan = false;
 
 		snprintf(mrc.name, MII_BUS_ID_SIZE, "%s-pcs-mii", ndev->name);
 		pcs_bus = devm_mdio_regmap_register(&pdev->dev, &mrc);
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH net-next v3 5/5] net: dwmac_socfpga: explicitly disable autoscan on the regmap-mdio bus
@ 2023-06-06 15:25   ` Maxime Chevallier
  0 siblings, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2023-06-06 15:25 UTC (permalink / raw)
  To: davem
  Cc: Maxime Chevallier, netdev, linux-kernel, alexis.lothore,
	thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
	Paolo Abeni, Florian Fainelli, Heiner Kallweit, Russell King,
	Vladimir Oltean, Ioana Ciornei, linux-stm32, linux-arm-kernel,
	Maxime Coquelin, Jose Abreu, Alexandre Torgue,
	Giuseppe Cavallaro, Simon Horman, Russell King

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: 5d1f3fe7d2d5 ("net: stmmac: dwmac-sogfpga: use the lynx pcs driver")
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/stmicro/stmmac/dwmac-socfpga.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index 1fb808be843b..e1bdf132cede 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -470,6 +470,7 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
 		mrc.regmap = pcs_regmap;
 		mrc.parent = &pdev->dev;
 		mrc.valid_addr = 0x0;
+		mrc.autoscan = false;
 
 		snprintf(mrc.name, MII_BUS_ID_SIZE, "%s-pcs-mii", ndev->name);
 		pcs_bus = devm_mdio_regmap_register(&pdev->dev, &mrc);
-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next v3 0/5] Followup fixes for the dwmac and altera lynx conversion
  2023-06-06 15:24 ` Maxime Chevallier
@ 2023-06-06 15:56   ` Russell King (Oracle)
  -1 siblings, 0 replies; 18+ messages in thread
From: Russell King (Oracle) @ 2023-06-06 15:56 UTC (permalink / raw)
  To: Maxime Chevallier
  Cc: davem, netdev, linux-kernel, alexis.lothore, thomas.petazzoni,
	Andrew Lunn, Jakub Kicinski, Eric Dumazet, Paolo Abeni,
	Florian Fainelli, Heiner Kallweit, Vladimir Oltean,
	Ioana Ciornei, linux-stm32, linux-arm-kernel, Maxime Coquelin,
	Jose Abreu, Alexandre Torgue, Giuseppe Cavallaro, Simon Horman

On Tue, Jun 06, 2023 at 05:24:56PM +0200, Maxime Chevallier wrote:
> Hello everyone,
> 
> Here's another version of the cleanup series for the TSE PCS replacement
> by PCS Lynx. It includes Kconfig fixups, some missing initialisations
> and a slight rework suggested by Russell for the dwmac cleanup sequence.

Thanks, this is getting there, but now you've now made me read
altera_tse.c, and it suffers the same issue that dwmac-socfpga.c does:

        ret = register_netdev(ndev);
...
        priv->pcs = lynx_pcs_create_mdiodev(pcs_bus, 0);
...
        priv->phylink = phylink_create(&priv->phylink_config,

This means you're publishing before you've finished setup - which is
a racy thing to do, especially if the driver is a module.

Let's think about what could happen. register_netdev() adds the network
device to the net layer and publishes it to userspace. Userspace notices
a new network interface and configures it, causing tse_open() to be
called. However, priv->phylink has not yet been initialised.

tse_open() then does:

        ret = phylink_of_phy_connect(priv->phylink, priv->device->of_node, 0);

and phylink_of_phy_connect() attempts to dereference it's first
argument, resulting in a NULL pointer dereference. Even if that doesn't
get you, then:

        phylink_start(priv->phylink);

will.

Golden rule: setup everything you need first, and only once that's
complete, publish. If you publish before you've completed setup, then
you're giving permission for other stuff to immediately start making
use of what you've published, which may occur before the remainder of
the initialisation has completed.

Lastly, remember that phylink_start() can result in the link coming up
_immediately_ (that means mac_link_up() could be called before it's
returned), so I would hope that the Altera TSE driver is prepared
for that to happen before napi, queues, and rx dma are ready.

Not saying that there's anything wrong with this series (there isn't),
merely that there's more issues that ought to be resolved.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next v3 0/5] Followup fixes for the dwmac and altera lynx conversion
@ 2023-06-06 15:56   ` Russell King (Oracle)
  0 siblings, 0 replies; 18+ messages in thread
From: Russell King (Oracle) @ 2023-06-06 15:56 UTC (permalink / raw)
  To: Maxime Chevallier
  Cc: davem, netdev, linux-kernel, alexis.lothore, thomas.petazzoni,
	Andrew Lunn, Jakub Kicinski, Eric Dumazet, Paolo Abeni,
	Florian Fainelli, Heiner Kallweit, Vladimir Oltean,
	Ioana Ciornei, linux-stm32, linux-arm-kernel, Maxime Coquelin,
	Jose Abreu, Alexandre Torgue, Giuseppe Cavallaro, Simon Horman

On Tue, Jun 06, 2023 at 05:24:56PM +0200, Maxime Chevallier wrote:
> Hello everyone,
> 
> Here's another version of the cleanup series for the TSE PCS replacement
> by PCS Lynx. It includes Kconfig fixups, some missing initialisations
> and a slight rework suggested by Russell for the dwmac cleanup sequence.

Thanks, this is getting there, but now you've now made me read
altera_tse.c, and it suffers the same issue that dwmac-socfpga.c does:

        ret = register_netdev(ndev);
...
        priv->pcs = lynx_pcs_create_mdiodev(pcs_bus, 0);
...
        priv->phylink = phylink_create(&priv->phylink_config,

This means you're publishing before you've finished setup - which is
a racy thing to do, especially if the driver is a module.

Let's think about what could happen. register_netdev() adds the network
device to the net layer and publishes it to userspace. Userspace notices
a new network interface and configures it, causing tse_open() to be
called. However, priv->phylink has not yet been initialised.

tse_open() then does:

        ret = phylink_of_phy_connect(priv->phylink, priv->device->of_node, 0);

and phylink_of_phy_connect() attempts to dereference it's first
argument, resulting in a NULL pointer dereference. Even if that doesn't
get you, then:

        phylink_start(priv->phylink);

will.

Golden rule: setup everything you need first, and only once that's
complete, publish. If you publish before you've completed setup, then
you're giving permission for other stuff to immediately start making
use of what you've published, which may occur before the remainder of
the initialisation has completed.

Lastly, remember that phylink_start() can result in the link coming up
_immediately_ (that means mac_link_up() could be called before it's
returned), so I would hope that the Altera TSE driver is prepared
for that to happen before napi, queues, and rx dma are ready.

Not saying that there's anything wrong with this series (there isn't),
merely that there's more issues that ought to be resolved.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next v3 1/5] net: altera-tse: Initialize the regmap_config struct before using it
  2023-06-06 15:24   ` Maxime Chevallier
@ 2023-06-06 17:16     ` Maciej Fijalkowski
  -1 siblings, 0 replies; 18+ messages in thread
From: Maciej Fijalkowski @ 2023-06-06 17:16 UTC (permalink / raw)
  To: Maxime Chevallier
  Cc: davem, netdev, linux-kernel, alexis.lothore, thomas.petazzoni,
	Andrew Lunn, Jakub Kicinski, Eric Dumazet, Paolo Abeni,
	Florian Fainelli, Heiner Kallweit, Russell King, Vladimir Oltean,
	Ioana Ciornei, linux-stm32, linux-arm-kernel, Maxime Coquelin,
	Jose Abreu, Alexandre Torgue, Giuseppe Cavallaro, Simon Horman

On Tue, Jun 06, 2023 at 05:24:57PM +0200, Maxime Chevallier wrote:
> The regmap_config needs to be zeroed before using it. This will cause
> spurious errors at probe time as config->pad_bits is containing random
> uninitialized data.
> 
> Fixes: db48abbaa18e ("net: ethernet: altera-tse: Convert to mdio-regmap and use PCS Lynx")
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> ---
> V2->V3 : No changes
> V1->V2 : No changes
> 
>  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 d866c0f1b503..df509abcd378 100644
> --- a/drivers/net/ethernet/altera/altera_tse_main.c
> +++ b/drivers/net/ethernet/altera/altera_tse_main.c
> @@ -1255,6 +1255,7 @@ static int altera_tse_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto err_free_netdev;
>  
> +	memset(&pcs_regmap_cfg, 0, sizeof(pcs_regmap_cfg));

i think it would be good to zero out mrc as well - in future someone might
expand this struct and you will have the same bug as you're fixing here.

>  	/* SGMII PCS address space. The location can vary depending on how the
>  	 * IP is integrated. We can have a resource dedicated to it at a specific
>  	 * address space, but if it's not the case, we fallback to the mdiophy0
> -- 
> 2.40.1
> 
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next v3 1/5] net: altera-tse: Initialize the regmap_config struct before using it
@ 2023-06-06 17:16     ` Maciej Fijalkowski
  0 siblings, 0 replies; 18+ messages in thread
From: Maciej Fijalkowski @ 2023-06-06 17:16 UTC (permalink / raw)
  To: Maxime Chevallier
  Cc: davem, netdev, linux-kernel, alexis.lothore, thomas.petazzoni,
	Andrew Lunn, Jakub Kicinski, Eric Dumazet, Paolo Abeni,
	Florian Fainelli, Heiner Kallweit, Russell King, Vladimir Oltean,
	Ioana Ciornei, linux-stm32, linux-arm-kernel, Maxime Coquelin,
	Jose Abreu, Alexandre Torgue, Giuseppe Cavallaro, Simon Horman

On Tue, Jun 06, 2023 at 05:24:57PM +0200, Maxime Chevallier wrote:
> The regmap_config needs to be zeroed before using it. This will cause
> spurious errors at probe time as config->pad_bits is containing random
> uninitialized data.
> 
> Fixes: db48abbaa18e ("net: ethernet: altera-tse: Convert to mdio-regmap and use PCS Lynx")
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> ---
> V2->V3 : No changes
> V1->V2 : No changes
> 
>  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 d866c0f1b503..df509abcd378 100644
> --- a/drivers/net/ethernet/altera/altera_tse_main.c
> +++ b/drivers/net/ethernet/altera/altera_tse_main.c
> @@ -1255,6 +1255,7 @@ static int altera_tse_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto err_free_netdev;
>  
> +	memset(&pcs_regmap_cfg, 0, sizeof(pcs_regmap_cfg));

i think it would be good to zero out mrc as well - in future someone might
expand this struct and you will have the same bug as you're fixing here.

>  	/* SGMII PCS address space. The location can vary depending on how the
>  	 * IP is integrated. We can have a resource dedicated to it at a specific
>  	 * address space, but if it's not the case, we fallback to the mdiophy0
> -- 
> 2.40.1
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next v3 4/5] net: altera_tse: explicitly disable autoscan on the regmap-mdio bus
  2023-06-06 15:25   ` Maxime Chevallier
@ 2023-06-06 17:20     ` Maciej Fijalkowski
  -1 siblings, 0 replies; 18+ messages in thread
From: Maciej Fijalkowski @ 2023-06-06 17:20 UTC (permalink / raw)
  To: Maxime Chevallier
  Cc: davem, netdev, linux-kernel, alexis.lothore, thomas.petazzoni,
	Andrew Lunn, Jakub Kicinski, Eric Dumazet, Paolo Abeni,
	Florian Fainelli, Heiner Kallweit, Russell King, Vladimir Oltean,
	Ioana Ciornei, linux-stm32, linux-arm-kernel, Maxime Coquelin,
	Jose Abreu, Alexandre Torgue, Giuseppe Cavallaro, Simon Horman,
	Russell King

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
> 
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH net-next v3 4/5] net: altera_tse: explicitly disable autoscan on the regmap-mdio bus
@ 2023-06-06 17:20     ` Maciej Fijalkowski
  0 siblings, 0 replies; 18+ messages in thread
From: Maciej Fijalkowski @ 2023-06-06 17:20 UTC (permalink / raw)
  To: Maxime Chevallier
  Cc: davem, netdev, linux-kernel, alexis.lothore, thomas.petazzoni,
	Andrew Lunn, Jakub Kicinski, Eric Dumazet, Paolo Abeni,
	Florian Fainelli, Heiner Kallweit, Russell King, Vladimir Oltean,
	Ioana Ciornei, linux-stm32, linux-arm-kernel, Maxime Coquelin,
	Jose Abreu, Alexandre Torgue, Giuseppe Cavallaro, Simon Horman,
	Russell King

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
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-06-06 17:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 15:24 [PATCH net-next v3 0/5] Followup fixes for the dwmac and altera lynx conversion Maxime Chevallier
2023-06-06 15:24 ` Maxime Chevallier
2023-06-06 15:24 ` [PATCH net-next v3 1/5] net: altera-tse: Initialize the regmap_config struct before using it Maxime Chevallier
2023-06-06 15:24   ` Maxime Chevallier
2023-06-06 17:16   ` Maciej Fijalkowski
2023-06-06 17:16     ` Maciej Fijalkowski
2023-06-06 15:24 ` [PATCH net-next v3 2/5] net: altera_tse: Use the correct Kconfig option for the PCS_LYNX dependency Maxime Chevallier
2023-06-06 15:24   ` Maxime Chevallier
2023-06-06 15:24 ` [PATCH net-next v3 3/5] net: stmmac: make the pcs_lynx cleanup sequence specific to dwmac_socfpga Maxime Chevallier
2023-06-06 15:24   ` Maxime Chevallier
2023-06-06 15:25 ` [PATCH net-next v3 4/5] net: altera_tse: explicitly disable autoscan on the regmap-mdio bus Maxime Chevallier
2023-06-06 15:25   ` Maxime Chevallier
2023-06-06 17:20   ` Maciej Fijalkowski
2023-06-06 17:20     ` Maciej Fijalkowski
2023-06-06 15:25 ` [PATCH net-next v3 5/5] net: dwmac_socfpga: " Maxime Chevallier
2023-06-06 15:25   ` Maxime Chevallier
2023-06-06 15:56 ` [PATCH net-next v3 0/5] Followup fixes for the dwmac and altera lynx conversion Russell King (Oracle)
2023-06-06 15:56   ` Russell King (Oracle)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.