aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@collabora.com>2021-05-17 12:40:34 -0300
committerDavid S. Miller <davem@davemloft.net>2021-05-17 15:34:43 -0700
commitd6b0625163a8948341d12cac420402a31093b5ed (patch)
tree417acb74bc4e7e17ec311e20e3fc5e4d2014a715 /drivers/net/ethernet/stmicro
parentnet: Remove the member netns_ok (diff)
downloadlinux-dev-d6b0625163a8948341d12cac420402a31093b5ed.tar.xz
linux-dev-d6b0625163a8948341d12cac420402a31093b5ed.zip
net: stmmac: Don't set has_gmac if has_gmac4 is set
Some Rockchip platforms have a GMAC4 core, and therefore 'plat_stmmacenet_data.has_gmac' shouldn't be set if 'plat_stmmacenet_data.has_gmac4' is set. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 584db4ce6e39..56034f21fcef 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1448,7 +1448,11 @@ static int rk_gmac_probe(struct platform_device *pdev)
if (IS_ERR(plat_dat))
return PTR_ERR(plat_dat);
- plat_dat->has_gmac = true;
+ /* If the stmmac is not already selected as gmac4,
+ * then make sure we fallback to gmac.
+ */
+ if (!plat_dat->has_gmac4)
+ plat_dat->has_gmac = true;
plat_dat->fix_mac_speed = rk_fix_speed;
plat_dat->bsp_priv = rk_gmac_setup(pdev, plat_dat, data);