Skip to content

Commit 6dfaaa2

Browse files
CHKDSK88kuba-moo
authored andcommitted
net: dsa: vsc73xx: Add bridge support
This patch adds bridge support for the vsc73xx driver. The vsc73xx requires minimal operations and ithe generic dsa_tag_8021q_bridge_* API is sufficient. The forwarding matrix is managed by vsc73xx_port_stp_state_set() -> vsc73xx_refresh_fwd_map()i routine, which is called immediately after .port_bridge_join() and .port_bridge_leave(). Reviewed-by: Vladimir Oltean <[email protected]> Signed-off-by: Pawel Dembicki <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 85aabd1 commit 6dfaaa2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/dsa/vitesse-vsc73xx-core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,9 @@ static int vsc73xx_setup(struct dsa_switch *ds)
691691

692692
dev_info(vsc->dev, "set up the switch\n");
693693

694+
ds->untag_bridge_pvid = true;
695+
ds->max_num_bridges = DSA_TAG_8021Q_MAX_NUM_BRIDGES;
696+
694697
/* Issue RESET */
695698
vsc73xx_write(vsc, VSC73XX_BLOCK_SYSTEM, 0, VSC73XX_GLORESET,
696699
VSC73XX_GLORESET_MASTER_RESET);
@@ -1716,6 +1719,8 @@ static const struct dsa_switch_ops vsc73xx_ds_ops = {
17161719
.get_sset_count = vsc73xx_get_sset_count,
17171720
.port_enable = vsc73xx_port_enable,
17181721
.port_disable = vsc73xx_port_disable,
1722+
.port_bridge_join = dsa_tag_8021q_bridge_join,
1723+
.port_bridge_leave = dsa_tag_8021q_bridge_leave,
17191724
.port_change_mtu = vsc73xx_change_mtu,
17201725
.port_max_mtu = vsc73xx_get_max_mtu,
17211726
.port_stp_state_set = vsc73xx_port_stp_state_set,

0 commit comments

Comments
 (0)