Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7c97bc0

Browse files
Doug Bergerkuba-moo
authored andcommitted
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: 246d7f7 ("net: dsa: add Broadcom SF2 switch driver") Signed-off-by: Doug Berger <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 16d584d commit 7c97bc0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/dsa/bcm_sf2.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,11 @@ static void bcm_sf2_sw_mac_link_up(struct dsa_switch *ds, int port,
878878
if (duplex == DUPLEX_FULL)
879879
reg |= DUPLX_MODE;
880880

881+
if (tx_pause)
882+
reg |= TXFLOW_CNTL;
883+
if (rx_pause)
884+
reg |= RXFLOW_CNTL;
885+
881886
core_writel(priv, reg, offset);
882887
}
883888

0 commit comments

Comments
 (0)