linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: stmmac: Wait a bit for the reset to take effect
@ 2023-10-30  6:01 Bernd Edlinger
  2023-10-30 11:55 ` Jiri Pirko
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Bernd Edlinger @ 2023-10-30  6:01 UTC (permalink / raw)
  To: Alexandre Torgue, Jose Abreu, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Maxime Coquelin, netdev, linux-stm32,
	linux-arm-kernel, linux-kernel@vger.kernel.org

otherwise the synopsys_id value may be read out wrong,
because the GMAC_VERSION register might still be in reset
state, for at least 1 us after the reset is de-asserted.

Add a wait for 10 us before continuing to be on the safe side.

Signed-off-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 5801f4d50f95..e485f4db3605 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7398,6 +7398,9 @@ int stmmac_dvr_probe(struct device *device,
 		dev_err(priv->device, "unable to bring out of ahb reset: %pe\n",
 			ERR_PTR(ret));
 
+	/* Wait a bit for the reset to take effect */
+	udelay(10);
+
 	/* Init MAC and get the capabilities */
 	ret = stmmac_hw_init(priv);
 	if (ret)
-- 
2.39.2


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

end of thread, other threads:[~2024-01-24 20:30 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-30  6:01 [PATCH] net: stmmac: Wait a bit for the reset to take effect Bernd Edlinger
2023-10-30 11:55 ` Jiri Pirko
2023-10-31 10:32 ` Serge Semin
2023-10-31 16:10   ` Bernd Edlinger
2023-11-02 12:03     ` Serge Semin
2023-11-02 11:25 ` Paolo Abeni
2023-11-03 10:45   ` Bernd Edlinger
2024-01-15 19:21 ` [PATCH v2] " Bernd Edlinger
2024-01-16 12:22   ` Paolo Abeni
2024-01-17 16:36     ` Bernd Edlinger
2024-01-19 10:27     ` Bernd Edlinger
2024-01-19 11:42       ` Paolo Abeni
2024-01-16 22:35   ` Andrew Lunn
2024-01-17 16:48     ` Bernd Edlinger
2024-01-17 16:55       ` Jose Abreu
2024-01-19  7:15         ` Bernd Edlinger
2024-01-19 10:38           ` Jose Abreu
2024-01-22  6:41             ` Bernd Edlinger
2024-01-22 15:44               ` Jose Abreu
2024-01-22 18:19   ` [PATCH net v3] " Bernd Edlinger
2024-01-24 13:31     ` Serge Semin
2024-01-24 20:30     ` patchwork-bot+netdevbpf

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