[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241014045053.9152-1-peter@rashleigh.ca>
Date: Sun, 13 Oct 2024 21:50:53 -0700
From: Peter Rashleigh <peter@...hleigh.ca>
To: andrew@...n.ch
Cc: netdev@...r.kernel.org,
Peter Rashleigh <peter@...hleigh.ca>
Subject: [PATCH net] net: dsa: mv88e6xxx: Fix errors in max_vid and port policy for 88E6361
The 88E6361 has two VTU pages (8192 VIDs), so fix the max_vid definition.
Also fix an error in mv88e6393x_port_set_policy where the register
gets an unexpected value because the ptr is written over the data bits.
Signed-off-by: Peter Rashleigh <peter@...hleigh.ca>
---
drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
drivers/net/dsa/mv88e6xxx/port.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 5b4e2ce5470d..284270a4ade1 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -6347,7 +6347,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.invalid_port_mask = BIT(1) | BIT(2) | BIT(8),
.num_internal_phys = 5,
.internal_phys_offset = 3,
- .max_vid = 4095,
+ .max_vid = 8191,
.max_sid = 63,
.port_base_addr = 0x0,
.phy_base_addr = 0x0,
diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c
index 5394a8cf7bf1..04053fdc6489 100644
--- a/drivers/net/dsa/mv88e6xxx/port.c
+++ b/drivers/net/dsa/mv88e6xxx/port.c
@@ -1713,6 +1713,7 @@ int mv88e6393x_port_set_policy(struct mv88e6xxx_chip *chip, int port,
ptr = shift / 8;
shift %= 8;
mask >>= ptr * 8;
+ ptr <<= 8;
err = mv88e6393x_port_policy_read(chip, port, ptr, ®);
if (err)
base-commit: d3d1556696c1a993eec54ac585fe5bf677e07474
--
2.34.1
Powered by blists - more mailing lists