diff mbox series

[v2,net] net: dsa: mv88e6xxx: Fix the max_vid definition for the MV88E6361

Message ID 20241014204342.5852-1-peter@rashleigh.ca (mailing list archive)
State Accepted
Commit 1833d8a26f057128fd63e126b4428203ece84684
Delegated to: Netdev Maintainers
Headers show
Series [v2,net] net: dsa: mv88e6xxx: Fix the max_vid definition for the MV88E6361 | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 5 this patch: 5
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers fail 2 blamed authors not CCed: alexis.lothore@bootlin.com kuba@kernel.org; 6 maintainers not CCed: edumazet@google.com kuba@kernel.org f.fainelli@gmail.com olteanv@gmail.com pabeni@redhat.com alexis.lothore@bootlin.com
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 4 this patch: 4
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-10-15--06-00 (tests: 777)

Commit Message

Peter Rashleigh Oct. 14, 2024, 8:43 p.m. UTC
According to the Marvell datasheet the 88E6361 has two VTU pages
(4k VIDs per page) so the max_vid should be 8191, not 4095.

In the current implementation mv88e6xxx_vtu_walk() gives unexpected
results because of this error. I verified that mv88e6xxx_vtu_walk()
works correctly on the MV88E6361 with this patch in place.

Fixes: 12899f299803 ("net: dsa: mv88e6xxx: enable support for 88E6361 switch")
Signed-off-by: Peter Rashleigh <peter@rashleigh.ca>

---
Changes since v1:
 - Update message to clarify why the change is needed
 - Remove changes to mv88e6393x_port_set_policy to a separate patch

 drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: d3d1556696c1a993eec54ac585fe5bf677e07474

Comments

Andrew Lunn Oct. 14, 2024, 8:57 p.m. UTC | #1
On Mon, Oct 14, 2024 at 01:43:42PM -0700, Peter Rashleigh wrote:
> According to the Marvell datasheet the 88E6361 has two VTU pages
> (4k VIDs per page) so the max_vid should be 8191, not 4095.
> 
> In the current implementation mv88e6xxx_vtu_walk() gives unexpected
> results because of this error. I verified that mv88e6xxx_vtu_walk()
> works correctly on the MV88E6361 with this patch in place.
> 
> Fixes: 12899f299803 ("net: dsa: mv88e6xxx: enable support for 88E6361 switch")
> Signed-off-by: Peter Rashleigh <peter@rashleigh.ca>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
patchwork-bot+netdevbpf@kernel.org Oct. 16, 2024, 1 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 14 Oct 2024 13:43:42 -0700 you wrote:
> According to the Marvell datasheet the 88E6361 has two VTU pages
> (4k VIDs per page) so the max_vid should be 8191, not 4095.
> 
> In the current implementation mv88e6xxx_vtu_walk() gives unexpected
> results because of this error. I verified that mv88e6xxx_vtu_walk()
> works correctly on the MV88E6361 with this patch in place.
> 
> [...]

Here is the summary with links:
  - [v2,net] net: dsa: mv88e6xxx: Fix the max_vid definition for the MV88E6361
    https://git.kernel.org/netdev/net/c/1833d8a26f05

You are awesome, thank you!
diff mbox series

Patch

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,