aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGravatar Vladimir Oltean <vladimir.oltean@nxp.com> 2022-02-16 16:30:04 +0200
committerGravatar David S. Miller <davem@davemloft.net> 2022-02-17 14:06:50 +0000
commite3c02b7c655cdfff240a7b8bfeff5ea06c006e12 (patch)
tree5cf064bc0afe5fae317c9cf247af531367ba2045 /drivers
parentMerge tag 'mlx5-updates-2022-02-16' of git://git.kernel.org/pub/scm/linux/ker... (diff)
downloadlinux-e3c02b7c655cdfff240a7b8bfeff5ea06c006e12.tar.gz
linux-e3c02b7c655cdfff240a7b8bfeff5ea06c006e12.tar.bz2
linux-e3c02b7c655cdfff240a7b8bfeff5ea06c006e12.zip
net: mscc: ocelot: use a consistent cookie for MRP traps
The driver uses an identifier equal to (ocelot->num_phys_ports + port) for MRP traps installed when the system is in the role of an MRC, and an identifier equal to (port) otherwise. Use the same identifier in both cases as a consolidation for the various cookie values spread throughout the driver. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mscc/ocelot_mrp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_mrp.c b/drivers/net/ethernet/mscc/ocelot_mrp.c
index 1fa58546abdc..742242bab6ef 100644
--- a/drivers/net/ethernet/mscc/ocelot_mrp.c
+++ b/drivers/net/ethernet/mscc/ocelot_mrp.c
@@ -186,7 +186,8 @@ int ocelot_mrp_add_ring_role(struct ocelot *ocelot, int port,
ocelot_mrp_save_mac(ocelot, ocelot_port);
if (mrp->ring_role != BR_MRP_RING_ROLE_MRC)
- return ocelot_mrp_copy_add_vcap(ocelot, port, 1, port);
+ return ocelot_mrp_copy_add_vcap(ocelot, port, 1,
+ port + ocelot->num_phys_ports);
dst_port = ocelot_mrp_find_partner_port(ocelot, ocelot_port);
if (dst_port == -1)