Skip to contentSkip to conversation

net: dsa: mv88e6xxx: fix atu_move_port_mask for 6341 family

PATCH In review Marek Behún 2 participants 6 messages Apr 28, 2025 – Apr 29, 2025 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 net: dsa: mv88e6xxx: fix atu_move_port_mask for 6341 family

commit 4ae01ec007716986e1a20f1285eb013cbf188830 upstream.

The atu_move_port_mask for 6341 family (Topaz) is 0xf, not 0x1f. The PortVec field is 8 bits wide, not 11 as in 6390 family. Fix this.

Fixes e606ca36bbf2 ("net: dsa: mv88e6xxx: rework ATU Remove")
---
 drivers/net/dsa/mv88e6xxx/chip.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/dsa/mv88e6xxx/chip.c +2 -2
index 9f7ff54894d4..02bcf5a4b073 100644
@@ -5217,7 +5217,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
 		.global1_addr = 0x1b,
 		.global2_addr = 0x1c,
 		.age_time_coeff = 3750,
-		.atu_move_port_mask = 0x1f,
+		.atu_move_port_mask = 0xf,
 		.g1_irqs = 9,
 		.g2_irqs = 10,
 		.pvt = true,
@@ -5660,7 +5660,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
 		.global1_addr = 0x1b,
 		.global2_addr = 0x1c,
 		.age_time_coeff = 3750,
-		.atu_move_port_mask = 0x1f,
+		.atu_move_port_mask = 0xf,
 		.g1_irqs = 9,
 		.g2_irqs = 10,
 		.pvt = true,
Signature · 1 line
2.49.0
#1 lore raw

PATCH 2/3 net: dsa: mv88e6xxx: enable PVT for 6321 switch

commit f85c69369854a43af2c5d3b3896da0908d713133 upstream.

Commit f36456522168 ("net: dsa: mv88e6xxx: move PVT description in info") did not enable PVT for 6321 switch. Fix it.

Fixes f36456522168 ("net: dsa: mv88e6xxx: move PVT description in info")
---
 drivers/net/dsa/mv88e6xxx/chip.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/dsa/mv88e6xxx/chip.c +1 -0
index 02bcf5a4b073..06ae3440c785 100644
@@ -5639,6 +5639,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
 		.g1_irqs = 8,
 		.g2_irqs = 10,
 		.atu_move_port_mask = 0xf,
+		.pvt = true,
 		.multi_chip = true,
 		.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
 		.ptp_support = true,
Signature · 1 line
2.49.0
maintainer
#2 lore raw

Re: [PATCH 5.15.y 2/3] net: dsa: mv88e6xxx: enable PVT for 6321 switch

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected. No action required from the submitter.

The upstream commit SHA1 provided is correct: f85c69369854a43af2c5d3b3896da0908d713133

Status in newer kernel trees:
6.14.y | Present (different SHA1: 7eb13e5b4615)
6.12.y | Not found
6.6.y | Not found
6.1.y | Not found

Note: The patch differs from the upstream commit:
---
1: f85c69369854a ! 1: a6896c73ecdf9 net: dsa: mv88e6xxx: enable PVT for 6321 switch
@@ Metadata
## Commit message ##
net: dsa: mv88e6xxx: enable PVT for 6321 switch

+ commit f85c69369854a43af2c5d3b3896da0908d713133 upstream.
+
Commit f36456522168 ("net: dsa: mv88e6xxx: move PVT description in info") did not enable PVT for 6321 switch. Fix it.

Fixes f36456522168 ("net: dsa: mv88e6xxx: move PVT description in info")

- Reviewed-by: Andrew Lunn <[email protected]>
- Link: https://patch.msgid.link/[email protected]
- Signed-off-by: Jakub Kicinski <[email protected]>

## drivers/net/dsa/mv88e6xxx/chip.c ##
@@ drivers/net/dsa/mv88e6xxx/chip.c: static const struct mv88e6xxx_info mv88e6xxx_table[] = {
+ .g1_irqs = 8,
.g2_irqs = 10,
- .stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
.atu_move_port_mask = 0xf,
+ .pvt = true,
.multi_chip = true,
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y        |  Success    |  Success   |
#3 lore raw

PATCH 3/3 net: dsa: mv88e6xxx: enable .port_set_policy() for 6320 family

In reply to Marek Behún

commit a2ef58e2c4aea4de166fc9832eb2b621e88c98d5 upstream.

Commit f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy") did not add the .port_set_policy() method for the 6320 family. Fix it.

Fixes f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy")
---
 drivers/net/dsa/mv88e6xxx/chip.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/dsa/mv88e6xxx/chip.c +2 -0
index 06ae3440c785..2d1d60dbe7f0 100644
@@ -4597,6 +4597,7 @@ static const struct mv88e6xxx_ops mv88e6320_ops = {
 	.port_sync_link = mv88e6xxx_port_sync_link,
 	.port_set_speed_duplex = mv88e6185_port_set_speed_duplex,
 	.port_tag_remap = mv88e6095_port_tag_remap,
+	.port_set_policy = mv88e6352_port_set_policy,
 	.port_set_frame_mode = mv88e6351_port_set_frame_mode,
 	.port_set_ucast_flood = mv88e6352_port_set_ucast_flood,
 	.port_set_mcast_flood = mv88e6352_port_set_mcast_flood,
@@ -4644,6 +4645,7 @@ static const struct mv88e6xxx_ops mv88e6321_ops = {
 	.port_sync_link = mv88e6xxx_port_sync_link,
 	.port_set_speed_duplex = mv88e6185_port_set_speed_duplex,
 	.port_tag_remap = mv88e6095_port_tag_remap,
+	.port_set_policy = mv88e6352_port_set_policy,
 	.port_set_frame_mode = mv88e6351_port_set_frame_mode,
 	.port_set_ucast_flood = mv88e6352_port_set_ucast_flood,
 	.port_set_mcast_flood = mv88e6352_port_set_mcast_flood,
Signature · 1 line
2.49.0
maintainer
#4 lore raw

Re: [PATCH 5.15.y 3/3] net: dsa: mv88e6xxx: enable .port_set_policy() for 6320 family

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected. No action required from the submitter.

The upstream commit SHA1 provided is correct: a2ef58e2c4aea4de166fc9832eb2b621e88c98d5

Status in newer kernel trees:
6.14.y | Present (different SHA1: a0898cf9a38d)
6.12.y | Not found
6.6.y | Not found
6.1.y | Not found

Note: The patch differs from the upstream commit:
---
1: a2ef58e2c4aea ! 1: 0730fa59a0c25 net: dsa: mv88e6xxx: enable .port_set_policy() for 6320 family

    @@ Metadata
      ## Commit message ##
         net: dsa: mv88e6xxx: enable .port_set_policy() for 6320 family
     
    +    commit a2ef58e2c4aea4de166fc9832eb2b621e88c98d5 upstream.
    +
         Commit f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy")
         did not add the .port_set_policy() method for the 6320 family. Fix it.
     
         Fixes: f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy")
         Signed-off-by: Marek Behún <[email protected]>
    -    Reviewed-by: Andrew Lunn <[email protected]>
    -    Link: https://patch.msgid.link/[email protected]
    -    Signed-off-by: Jakub Kicinski <[email protected]>
     
      ## drivers/net/dsa/mv88e6xxx/chip.c ##
     @@ drivers/net/dsa/mv88e6xxx/chip.c: static const struct mv88e6xxx_ops mv88e6320_ops = {
    - 	.port_set_rgmii_delay = mv88e6320_port_set_rgmii_delay,
    + 	.port_sync_link = mv88e6xxx_port_sync_link,
      	.port_set_speed_duplex = mv88e6185_port_set_speed_duplex,
      	.port_tag_remap = mv88e6095_port_tag_remap,
     +	.port_set_policy = mv88e6352_port_set_policy,
    @@ drivers/net/dsa/mv88e6xxx/chip.c: static const struct mv88e6xxx_ops mv88e6320_op
      	.port_set_ucast_flood = mv88e6352_port_set_ucast_flood,
      	.port_set_mcast_flood = mv88e6352_port_set_mcast_flood,
     @@ drivers/net/dsa/mv88e6xxx/chip.c: static const struct mv88e6xxx_ops mv88e6321_ops = {
    - 	.port_set_rgmii_delay = mv88e6320_port_set_rgmii_delay,
    + 	.port_sync_link = mv88e6xxx_port_sync_link,
      	.port_set_speed_duplex = mv88e6185_port_set_speed_duplex,
      	.port_tag_remap = mv88e6095_port_tag_remap,
     +	.port_set_policy = mv88e6352_port_set_policy,

---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y        |  Success    |  Success   |
maintainer
#5 lore raw
In reply to Marek Behún

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected. No action required from the submitter.

The upstream commit SHA1 provided is correct: 4ae01ec007716986e1a20f1285eb013cbf188830

Status in newer kernel trees:
6.14.y | Present (different SHA1: 74c9ffccc3c8)
6.12.y | Not found
6.6.y | Not found
6.1.y | Not found

Note: The patch differs from the upstream commit:
---
1: 4ae01ec007716 ! 1: c951fb413223a net: dsa: mv88e6xxx: fix atu_move_port_mask for 6341 family
@@ Metadata
## Commit message ##
net: dsa: mv88e6xxx: fix atu_move_port_mask for 6341 family

+ commit 4ae01ec007716986e1a20f1285eb013cbf188830 upstream.
+
The atu_move_port_mask for 6341 family (Topaz) is 0xf, not 0x1f. The PortVec field is 8 bits wide, not 11 as in 6390 family. Fix this.

Fixes e606ca36bbf2 ("net: dsa: mv88e6xxx: rework ATU Remove")

- Reviewed-by: Andrew Lunn <[email protected]>
- Link: https://patch.msgid.link/[email protected]
- Signed-off-by: Jakub Kicinski <[email protected]>

## drivers/net/dsa/mv88e6xxx/chip.c ##
@@ drivers/net/dsa/mv88e6xxx/chip.c: static const struct mv88e6xxx_info mv88e6xxx_table[] = {
@@ drivers/net/dsa/mv88e6xxx/chip.c: static const struct mv88e6xxx_info mv88e6xxx_t
+ .atu_move_port_mask = 0xf,
.g1_irqs = 9,
.g2_irqs = 10,
- .stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
+ .pvt = true,
@@ drivers/net/dsa/mv88e6xxx/chip.c: static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.global1_addr = 0x1b,
.global2_addr = 0x1c,
@@ drivers/net/dsa/mv88e6xxx/chip.c: static const struct mv88e6xxx_info mv88e6xxx_t
+ .atu_move_port_mask = 0xf,
.g1_irqs = 9,
.g2_irqs = 10,
- .stats_type = STATS_TYPE_BANK0 | STATS_TYPE_BANK1,
+ .pvt = true,
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-5.15.y       |  Success    |  Success   |