]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dsa: mv88e6xxx: Fix error when setting port policy on mv88e6393x
authorPeter Rashleigh <peter@rashleigh.ca>
Wed, 16 Oct 2024 04:08:22 +0000 (21:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Nov 2024 00:52:36 +0000 (01:52 +0100)
commit7dbd5b9ff0676c360c8cb826570a91e5ffaa3cfc
tree7a1bfa3530dcbeac3ee0f2c40a85ab9d0ad29468
parent38eb596656434c58b9eba139c99e370f093990c4
net: dsa: mv88e6xxx: Fix error when setting port policy on mv88e6393x

[ Upstream commit 12bc14949c4a7272b509af0f1022a0deeb215fd8 ]

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: 6584b26020fc ("net: dsa: mv88e6xxx: implement .port_set_policy for Amethyst")
Signed-off-by: Peter Rashleigh <peter@rashleigh.ca>
Reviewed-by: Simon Horman <horms@kernel.org>
Message-ID: <20241016040822.3917-1-peter@rashleigh.ca>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/mv88e6xxx/port.c