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

net: dsa: bcm_sf2: force pause link settings

The pause settings reported by the PHY should also be applied to the GMII port
status override otherwise the switch will not generate pause frames towards the
link partner despite the advertisement saying otherwise.

Fixes: 246d7f773c13 ("net: dsa: add Broadcom SF2 switch driver")
Signed-off-by: Doug Berger <opendmb@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220623030204.1966851-1-f.fainelli@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Doug Berger and committed by
Jakub Kicinski
7c97bc01 16d584d2

+5
+5
drivers/net/dsa/bcm_sf2.c
··· 878 878 if (duplex == DUPLEX_FULL) 879 879 reg |= DUPLX_MODE; 880 880 881 + if (tx_pause) 882 + reg |= TXFLOW_CNTL; 883 + if (rx_pause) 884 + reg |= RXFLOW_CNTL; 885 + 881 886 core_writel(priv, reg, offset); 882 887 } 883 888