Skip to contentSkip to conversation

net: dsa: mv88e6xxx: Fix masking of egress port

PATCH Applied Andrew Lunn 2 participants 2 messages Feb 27, 2020

Subsystems (4)
lore
Share & tools
lore

Andrew Lunn

author maintainer
#0 lore raw

PATCH 1/1 net: dsa: mv88e6xxx: Fix masking of egress port

Add missing ~ to the usage of the mask.

Fixes 5c74c54ce6ff ("net: dsa: mv88e6xxx: Split monitor port configuration")
---
 drivers/net/dsa/mv88e6xxx/global1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/dsa/mv88e6xxx/global1.c +2 -2
index b016cc205f81..ca3a7a7a73c3 100644
@@ -278,13 +278,13 @@ int mv88e6095_g1_set_egress_port(struct mv88e6xxx_chip *chip,
 	switch (direction) {
 	case MV88E6XXX_EGRESS_DIR_INGRESS:
 		dest_port_chip = &chip->ingress_dest_port;
-		reg &= MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK;
+		reg &= ~MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK;
 		reg |= port <<
 		       __bf_shf(MV88E6185_G1_MONITOR_CTL_INGRESS_DEST_MASK);
 		break;
 	case MV88E6XXX_EGRESS_DIR_EGRESS:
 		dest_port_chip = &chip->egress_dest_port;
-		reg &= MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK;
+		reg &= ~MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK;
 		reg |= port <<
 		       __bf_shf(MV88E6185_G1_MONITOR_CTL_EGRESS_DEST_MASK);
 		break;
Signature · 1 line
2.25.0
maintainer Applied
#1 lore raw

From: Andrew Lunn <[email protected]>
Date: Thu, 27 Feb 2020 21:20:49 +0100

Quoted 6 lines

Add missing ~ to the usage of the mask.

Fixes 5c74c54ce6ff ("net: dsa: mv88e6xxx: Split monitor port configuration")

Applied, thanks Andrew.

Please put the Fixes: tag first in the list of tags in the future.

Thank you.