[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5efd2caf4fab5e08b47495360911a8767f182538.1704449760.git.ante.knezic@helmholz.de>
Date: Fri, 5 Jan 2024 11:46:18 +0100
From: Ante Knezic <ante.knezic@...mholz.de>
To: <netdev@...r.kernel.org>
CC: <andrew@...n.ch>, <f.fainelli@...il.com>, <olteanv@...il.com>,
<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <ante.knezic@...mholz.de>
Subject: [RFC PATCH net-next 5/6] net: dsa: mv88e6xxx: properly disable mirror destination
According to Switch Functional Specification in order to
disable policy mirroring we need to set mirror destination
to 0x1F.
Signed-off-by: Ante Knezic <ante.knezic@...mholz.de>
---
drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
drivers/net/dsa/mv88e6xxx/chip.h | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 1938f0b1644f..ce3a5d61edb4 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -6542,7 +6542,7 @@ static void mv88e6xxx_port_mirror_del(struct dsa_switch *ds, int from_port,
/* Reset egress port when no other mirror is active */
if (!other_mirrors) {
if (mv88e6xxx_set_egress_port(chip, direction,
- dsa_upstream_port(ds, from_port)))
+ MV88E6XXX_EGRESS_DEST_DISABLE))
dev_err(ds->dev, "failed to set egress port\n");
}
diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h
index 85eb293381a7..a73da4e965ec 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.h
+++ b/drivers/net/dsa/mv88e6xxx/chip.h
@@ -589,6 +589,9 @@ struct mv88e6xxx_ops {
const struct mv88e6xxx_hw_stat *stat,
uint64_t *data);
int (*set_cpu_port)(struct mv88e6xxx_chip *chip, int port);
+
+#define MV88E6XXX_EGRESS_DEST_DISABLE 0x1f
+
int (*set_egress_port)(struct mv88e6xxx_chip *chip,
enum mv88e6xxx_egress_direction direction,
int port);
--
2.11.0
Powered by blists - more mailing lists