From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Jon Hunter <jonathanh@nvidia.com>,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
Thierry Reding <treding@nvidia.com>
Subject: Re: [PATCH net-next] net: stmmac: dwc-qos: calibrate tegra with mdio bus idle
Date: Tue, 22 Apr 2025 16:42:30 +0200 [thread overview]
Message-ID: <20250422164230.5ffb90d3@fedora.home> (raw)
In-Reply-To: <E1u7EYR-001ZAS-Cr@rmk-PC.armlinux.org.uk>
Hello Russell,
On Tue, 22 Apr 2025 15:24:55 +0100
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> wrote:
> Thierry states that there are prerequists for Tegra's calibration
> that should be met before starting calibration - both the RGMII and
> MDIO interfaces should be idle.
>
> This commit adds the necessary MII bus locking to ensure that the MDIO
> interface is idle during calibration.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
[...]
> -static void tegra_eqos_fix_speed(void *priv, int speed, unsigned int mode)
> +static void tegra_eqos_fix_speed(void *bsp_priv, int speed, unsigned int mode)
> {
> - struct tegra_eqos *eqos = priv;
> + struct tegra_eqos *eqos = bsp_priv;
> bool needs_calibration = false;
> + struct stmmac_priv *priv;
> u32 value;
> int err;
>
> @@ -158,6 +159,11 @@ static void tegra_eqos_fix_speed(void *priv, int speed, unsigned int mode)
> }
>
> if (needs_calibration) {
> + priv = netdev_priv(dev_get_drvdata(eqos->dev));
> +
> + /* Calibration should be done with the MDIO bus idle */
> + mutex_lock(&priv->mii->mdio_lock);
Can't priv->mii be NULL, if the PHY for that MAC is connected to
another MDIO bus for instance ?
Maxime
next prev parent reply other threads:[~2025-04-22 18:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 14:24 [PATCH net-next] net: stmmac: dwc-qos: calibrate tegra with mdio bus idle Russell King (Oracle)
2025-04-22 14:42 ` Maxime Chevallier [this message]
2025-04-23 9:13 ` Thierry Reding
2025-04-23 9:14 ` Thierry Reding
2025-04-23 23:15 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250422164230.5ffb90d3@fedora.home \
--to=maxime.chevallier@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=treding@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.