Skip to contentSkip to conversation

net: dsa: mv88e6xxx: Fix errors in max_vid and port policy for 88E6361

PATCH In review Peter Rashleigh 2 participants 2 messages Oct 14, 2024

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

PATCH 1/1 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.

---
 drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
 drivers/net/dsa/mv88e6xxx/port.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/net/dsa/mv88e6xxx/chip.c +1 -1
index 5b4e2ce5470d..284270a4ade1 100644
@@ -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,
drivers/net/dsa/mv88e6xxx/port.c +1 -0
index 5394a8cf7bf1..04053fdc6489 100644
@@ -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, &reg);
 	if (err)

base-commit: d3d1556696c1a993eec54ac585fe5bf677e07474

Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 1 line · Peter Rashleigh

The 88E6361 has two VTU pages (8192 VIDs), so fix the max_vid definition.

Hi Peter

Is 88E6361 correct?

Quoted 3 lines

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.

Please make this two patches, since you fixing two things. Each patch needs a Fixes: tag.

Andrew

---
pw-bot: cr