[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<DM4PR12MB50885860C71F9E908A920CD0D354A@DM4PR12MB5088.namprd12.prod.outlook.com>
Date: Mon, 12 Jun 2023 09:49:53 +0000
From: Jose Abreu <Jose.Abreu@...opsys.com>
To: Bartosz Golaszewski <brgl@...ev.pl>, Vinod Koul <vkoul@...nel.org>,
Bhupesh Sharma <bhupesh.sharma@...aro.org>,
Andy Gross <agross@...nel.org>, Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio
<konrad.dybcio@...aro.org>,
"David S . Miller" <davem@...emloft.net>,
Eric
Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni
<pabeni@...hat.com>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski
<krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Giuseppe Cavallaro
<peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-phy@...ts.infradead.org" <linux-phy@...ts.infradead.org>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
"linux-stm32@...md-mailman.stormreply.com" <linux-stm32@...md-mailman.stormreply.com>,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
Jose Abreu <Jose.Abreu@...opsys.com>
Subject: RE: [PATCH 18/26] net: stmmac: add new switch to struct
plat_stmmacenet_data
From: Bartosz Golaszewski <brgl@...ev.pl>
Date: Mon, Jun 12, 2023 at 10:23:47
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>
> On some platforms, the PCS can be integrated in the MAC so the driver
> will not see any PCS link activity. Add a switch that allows the platform
> drivers to let the core code know.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
> include/linux/stmmac.h | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index fa07b0d50b46..fdcf1684487c 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -5793,7 +5793,7 @@ static void stmmac_common_interrupt(struct stmmac_priv *priv)
> }
>
> /* PCS link status */
> - if (priv->hw->pcs) {
> + if (priv->hw->pcs && !priv->plat->has_integrated_pcs) {
> if (priv->xstats.pcs_link)
> netif_carrier_on(priv->dev);
> else
> diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
> index 225751a8fd8e..06090538fe2d 100644
> --- a/include/linux/stmmac.h
> +++ b/include/linux/stmmac.h
> @@ -293,5 +293,6 @@ struct plat_stmmacenet_data {
> bool sph_disable;
> bool serdes_up_after_phy_linkup;
> const struct dwmac4_addrs *dwmac4_addrs;
> + bool has_integrated_pcs;
> };
> #endif
> --
> 2.39.2
We should eventually consider changing some elements of this struct to a bit-field.
Reviewed-by: Jose Abreu <Jose.Abreu@...opsys.com>
Thanks,
Jose
Powered by blists - more mailing lists