Skip to contentSkip to conversation

net: dsa: b53: Do not clear existing mirrored port mask

PATCH In review Florian Fainelli 3 participants 3 messages Oct 5, 2019 – Oct 6, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: b53: Do not clear existing mirrored port mask

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.

Fixes ed3af5fd08eb ("net: dsa: b53: Add support for port mirroring")
---
 drivers/net/dsa/b53/b53_common.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/dsa/b53/b53_common.c +0 -1
index 526ba2ab66f1..cc3536315eff 100644
@@ -1845,7 +1845,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);
 
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Florian Fainelli

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.

Fixes ed3af5fd08eb ("net: dsa: b53: Add support for port mirroring")
maintainer
#2 lore raw
In reply to Florian Fainelli

From: Florian Fainelli <[email protected]>
Date: Sat, 5 Oct 2019 15:05:18 -0700

Quoted 7 lines

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.

Fixes ed3af5fd08eb ("net: dsa: b53: Add support for port mirroring")

Applied and queued up for -stable, thanks.