Skip to content

Commit 12bc149

Browse files
prashlelunn
authored andcommitted
net: dsa: mv88e6xxx: Fix error when setting port policy on mv88e6393x
mv88e6393x_port_set_policy doesn't correctly shift the ptr value when converting the policy format between the old and new styles, so the target register ends up with the ptr being written over the data bits. Shift the pointer to align with the format expected by mv88e6393x_port_policy_write(). Fixes: 6584b26 ("net: dsa: mv88e6xxx: implement .port_set_policy for Amethyst") Signed-off-by: Peter Rashleigh <[email protected]> Reviewed-by: Simon Horman <[email protected]> Message-ID: <[email protected]> Signed-off-by: Andrew Lunn <[email protected]>
1 parent eb59200 commit 12bc149

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/dsa/mv88e6xxx

1 file changed

+1
-0
lines changed

drivers/net/dsa/mv88e6xxx/port.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,6 +1713,7 @@ int mv88e6393x_port_set_policy(struct mv88e6xxx_chip *chip, int port,
17131713
ptr = shift / 8;
17141714
shift %= 8;
17151715
mask >>= ptr * 8;
1716+
ptr <<= 8;
17161717

17171718
err = mv88e6393x_port_policy_read(chip, port, ptr, &reg);
17181719
if (err)

0 commit comments

Comments
 (0)