[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <j37ktiug7vwbb7h7s44zmng5a2bjzbd663p7pfowbehapjv3by@vrxfmapscaln>
Date: Tue, 31 Oct 2023 13:32:13 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: Bernd Edlinger <bernd.edlinger@...mail.de>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Maxime Coquelin <mcoquelin.stm32@...il.com>,
netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: stmmac: Wait a bit for the reset to take effect
On Mon, Oct 30, 2023 at 07:01:11AM +0100, Bernd Edlinger wrote:
> 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.
>From what have you got that delay value?
-Serge(y)
>
> Add a wait for 10 us before continuing to be on the safe side.
>
> Signed-off-by: Bernd Edlinger <bernd.edlinger@...mail.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
>
>
Powered by blists - more mailing lists