netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH] stmmac: socfpga: remove extra call to socfpga_dwmac_setup
@ 2016-04-15  1:42 dinguyen
  2016-04-17  1:48 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: dinguyen @ 2016-04-15  1:42 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: dinh.linux, mgerlach, davem, netdev, Dinh Nguyen

From: Dinh Nguyen <dinguyen@opensource.altera.com>

In the socfpga_dwmac_probe function, we have a call to socfpga_dwmac_setup,
which is already called from socfpga_dwmac_init later in the probe function.
Remove this extra call to socfpga_dwmac_setup.

Also we should not be calling socfpga_dwmac_setup() directly without wrapping
it around the proper reset assert/deasserts. That is because the
socfpga_dwmac_setup() is setting up PHY modes in the system manager, and it
is requires the EMAC's to be in reset during the PHY setup.

Reported-by: Matthew Gerlach <mgerlach@opensource.altera.com>
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
index f0d797a..41f4c58 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
@@ -267,12 +267,6 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	ret = socfpga_dwmac_setup(dwmac);
-	if (ret) {
-		dev_err(dev, "couldn't setup SoC glue (%d)\n", ret);
-		return ret;
-	}
-
 	plat_dat->bsp_priv = dwmac;
 	plat_dat->init = socfpga_dwmac_init;
 	plat_dat->exit = socfpga_dwmac_exit;
-- 
2.6.2

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

* Re: [net-next PATCH] stmmac: socfpga: remove extra call to socfpga_dwmac_setup
  2016-04-15  1:42 [net-next PATCH] stmmac: socfpga: remove extra call to socfpga_dwmac_setup dinguyen
@ 2016-04-17  1:48 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-04-17  1:48 UTC (permalink / raw)
  To: dinguyen; +Cc: peppe.cavallaro, dinh.linux, mgerlach, netdev

From: <dinguyen@opensource.altera.com>
Date: Thu, 14 Apr 2016 20:42:29 -0500

> From: Dinh Nguyen <dinguyen@opensource.altera.com>
> 
> In the socfpga_dwmac_probe function, we have a call to socfpga_dwmac_setup,
> which is already called from socfpga_dwmac_init later in the probe function.
> Remove this extra call to socfpga_dwmac_setup.
> 
> Also we should not be calling socfpga_dwmac_setup() directly without wrapping
> it around the proper reset assert/deasserts. That is because the
> socfpga_dwmac_setup() is setting up PHY modes in the system manager, and it
> is requires the EMAC's to be in reset during the PHY setup.
> 
> Reported-by: Matthew Gerlach <mgerlach@opensource.altera.com>
> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>

Applied, thank you.

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

end of thread, other threads:[~2016-04-17  1:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15  1:42 [net-next PATCH] stmmac: socfpga: remove extra call to socfpga_dwmac_setup dinguyen
2016-04-17  1:48 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).