Commit 9bc00973 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by David S. Miller

net: stmmac: dwmac-qcom-ethqos: fix a regression on EMAC < 3

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: b6837619 ("net: stmmac: dwmac-qcom-ethqos: Add EMAC3 support")
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarAndrew Halaney <ahalaney@redhat.com>
Reviewed-by: default avatarSiddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d7536931
...@@ -644,6 +644,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev) ...@@ -644,6 +644,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
plat_dat->fix_mac_speed = ethqos_fix_mac_speed; plat_dat->fix_mac_speed = ethqos_fix_mac_speed;
plat_dat->dump_debug_regs = rgmii_dump; plat_dat->dump_debug_regs = rgmii_dump;
plat_dat->has_gmac4 = 1; plat_dat->has_gmac4 = 1;
if (ethqos->has_emac3)
plat_dat->dwmac4_addrs = &data->dwmac4_addrs; plat_dat->dwmac4_addrs = &data->dwmac4_addrs;
plat_dat->pmt = 1; plat_dat->pmt = 1;
plat_dat->tso_en = of_property_read_bool(np, "snps,tso"); plat_dat->tso_en = of_property_read_bool(np, "snps,tso");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment