Hi On 25.02.2020 14:11, Nicolas Saenz Julienne wrote: > 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 <nsaenzjulie...@suse.de>
I've finally bisected the network issue I have on my RPi4 used for testing mainline builds. The bisect pointed to this patch. Once it got applied in v5.7-rc1, the networking is broken on my RPi4 in ARM32bit mode and kernel compiled from bcm2835_defconfig. I'm using u-boot to tftp zImage/dtb/initrd there. After reverting this patch network is working fine again. The strange thing is that networking works fine if kernel is compiled from multi_v7_defconfig but I don't see any obvious difference there. I'm not sure if u-boot is responsible for this break, but kernel definitely should be able to properly reset the hardware to the valid state. I can provide more information, just let me know what is needed. Here is the log, I hope it helps: [ 11.881784] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off [ 11.889935] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready root@target:~# ping host PING host (192.168.100.1) 56(84) bytes of data. From 192.168.100.53 icmp_seq=1 Destination Host Unreachable ... > --- > > Changes since v1: > - Fix tags ordering > - Add targeted tree > > drivers/net/ethernet/broadcom/genet/bcmmii.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c > b/drivers/net/ethernet/broadcom/genet/bcmmii.c > index 6392a2530183..10244941a7a6 100644 > --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c > +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c > @@ -294,6 +294,7 @@ int bcmgenet_mii_config(struct net_device *dev, bool init) > */ > if (priv->ext_phy) { > reg = bcmgenet_ext_readl(priv, EXT_RGMII_OOB_CTRL); > + reg &= ~ID_MODE_DIS; > reg |= id_mode_dis; > if (GENET_IS_V1(priv) || GENET_IS_V2(priv) || GENET_IS_V3(priv)) > reg |= RGMII_MODE_EN_V123; Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland