blob: e5911d7e502a5c2a0b383d5f0d925e0b71c22185 [file] [log] [blame]
From b2c233dbbdcb0990df2350f9879421f5ca419e64 Mon Sep 17 00:00:00 2001
From: Florian Fainelli <>
Date: Sat, 5 Oct 2019 15:05:18 -0700
Subject: [PATCH] net: dsa: b53: Do not clear existing mirrored port mask
commit c763ac436b668d7417f0979430ec0312ede4093d upstream.
Clearing the existing bitmask of mirrored ports essentially prevents us
from capturing more than one port at any given time. This is clearly
wrong, do not clear the bitmask prior to setting up the new port.
Reported-by: Hubert Feurstein <>
Fixes: ed3af5fd08eb ("net: dsa: b53: Add support for port mirroring")
Signed-off-by: Florian Fainelli <>
Reviewed-by: Vivien Didelot <>
Signed-off-by: David S. Miller <>
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index c8040ecf4425..3f728d609400 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1808,7 +1808,6 @@ int b53_mirror_add(struct dsa_switch *ds, int port,
loc = B53_EG_MIR_CTL;
b53_read16(dev, B53_MGMT_PAGE, loc, &reg);
- reg &= ~MIRROR_MASK;
reg |= BIT(port);
b53_write16(dev, B53_MGMT_PAGE, loc, reg);