[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ceg2ztzk3lzowssoydxwdq5pe3w7bgfbdpgalds3gwn5r2l5xb@bqufsqrqwlid>
Date: Fri, 2 Jun 2023 14:30:37 -0500
From: Andrew Halaney <ahalaney@...hat.com>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Vinod Koul <vkoul@...nel.org>,
Bhupesh Sharma <bhupesh.sharma@...aro.org>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
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>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH net] net: stmmac: dwmac-qcom-ethqos: fix a regression on
EMAC < 3
On Fri, Jun 02, 2023 at 09:04:55PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>
> We must not assign plat_dat->dwmac4_addrs unconditionally as for
> structures which don't set them, this will result in the core driver
> using zeroes everywhere and breaking the driver for older HW. On EMAC < 2
> the address should remain NULL.
>
> Fixes: b68376191c69 ("net: stmmac: dwmac-qcom-ethqos: Add EMAC3 support")
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Reviewed-by: Andrew Halaney <ahalaney@...hat.com>
Thanks for the fix, sorry about that!
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index 16a8c361283b..f07905f00f98 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -644,7 +644,8 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
> plat_dat->fix_mac_speed = ethqos_fix_mac_speed;
> plat_dat->dump_debug_regs = rgmii_dump;
> plat_dat->has_gmac4 = 1;
> - plat_dat->dwmac4_addrs = &data->dwmac4_addrs;
> + if (ethqos->has_emac3)
> + plat_dat->dwmac4_addrs = &data->dwmac4_addrs;
> plat_dat->pmt = 1;
> plat_dat->tso_en = of_property_read_bool(np, "snps,tso");
> if (of_device_is_compatible(np, "qcom,qcs404-ethqos"))
> --
> 2.39.2
>
Powered by blists - more mailing lists