Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: bcmgenet: Clear ID_MODE_DIS in EXT_RGMII_OOB_CTRL when not needed

Outdated Raspberry Pi 4 firmware might configure the external PHY as
rgmii although the kernel currently sets it as rgmii-rxid. This makes
connections unreliable as ID_MODE_DIS is left enabled. To avoid this,
explicitly clear that bit whenever we don't need it.

Fixes: da38802211cc ("net: bcmgenet: Add RGMII_RXID support")
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Nicolas Saenz Julienne and committed by
David S. Miller
402482a6 1521a67e

+1
+1
drivers/net/ethernet/broadcom/genet/bcmmii.c
··· 294 294 */ 295 295 if (priv->ext_phy) { 296 296 reg = bcmgenet_ext_readl(priv, EXT_RGMII_OOB_CTRL); 297 + reg &= ~ID_MODE_DIS; 297 298 reg |= id_mode_dis; 298 299 if (GENET_IS_V1(priv) || GENET_IS_V2(priv) || GENET_IS_V3(priv)) 299 300 reg |= RGMII_MODE_EN_V123;