Message ID | 20241014045053.9152-1-peter@rashleigh.ca (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] net: dsa: mv88e6xxx: Fix errors in max_vid and port policy for 88E6361 | expand |
On Sun, Oct 13, 2024 at 09:50:53PM -0700, Peter Rashleigh wrote: > The 88E6361 has two VTU pages (8192 VIDs), so fix the max_vid definition. Hi Peter Is 88E6361 correct? > > 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
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)
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@rashleigh.ca> --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- drivers/net/dsa/mv88e6xxx/port.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) base-commit: d3d1556696c1a993eec54ac585fe5bf677e07474