[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250927070724.734933-2-lukeh@padl.com>
Date: Sat, 27 Sep 2025 17:07:04 +1000
From: Luke Howard <lukeh@...l.com>
To: netdev@...r.kernel.org
Cc: andrew@...n.ch, vladimir.oltean@....com, kieran@...nda.com,
jcschroeder@...il.com, max@...tershome.org,
Luke Howard <lukeh@...l.com>
Subject: [RFC net-next 1/5] net: dsa: mv88e6xxx: add num_tx_queues to chip info structure
In preparation for adding 802.1Qav support (FQTSS), add an element to
struct mv88e6xxx_info indicating the number of transmit queues supported
by each chip.
Signed-off-by: Luke Howard <lukeh@...l.com>
---
drivers/net/dsa/mv88e6xxx/chip.c | 15 +++++++++++++++
drivers/net/dsa/mv88e6xxx/chip.h | 3 +++
2 files changed, 18 insertions(+)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index b4d48997bf467..42189aeb9aec0 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -4099,6 +4099,8 @@ static int mv88e6xxx_setup(struct dsa_switch *ds)
goto unlock;
}
+ ds->num_tx_queues = chip->info->num_tx_queues;
+
err = mv88e6xxx_stats_setup(chip);
if (err)
goto unlock;
@@ -5863,6 +5865,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.pvt = true,
.multi_chip = true,
.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
+ .num_tx_queues = 4,
.ops = &mv88e6141_ops,
},
@@ -5965,6 +5968,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.pvt = true,
.multi_chip = true,
.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
+ .num_tx_queues = 4,
.ops = &mv88e6172_ops,
},
@@ -6016,6 +6020,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.pvt = true,
.multi_chip = true,
.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
+ .num_tx_queues = 4,
.ops = &mv88e6176_ops,
},
@@ -6063,6 +6068,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.pvt = true,
.multi_chip = true,
.atu_move_port_mask = 0x1f,
+ .num_tx_queues = 8,
.ops = &mv88e6190_ops,
},
@@ -6088,6 +6094,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.atu_move_port_mask = 0x1f,
.pvt = true,
.multi_chip = true,
+ .num_tx_queues = 8,
.ops = &mv88e6190x_ops,
},
@@ -6217,6 +6224,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.multi_chip = true,
.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
.ptp_support = true,
+ .num_tx_queues = 4,
.ops = &mv88e6240_ops,
},
@@ -6264,6 +6272,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.pvt = true,
.multi_chip = true,
.ptp_support = true,
+ .num_tx_queues = 8,
.ops = &mv88e6290_ops,
},
@@ -6292,6 +6301,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.multi_chip = true,
.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
.ptp_support = true,
+ .num_tx_queues = 4,
.ops = &mv88e6320_ops,
},
@@ -6320,6 +6330,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.multi_chip = true,
.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
.ptp_support = true,
+ .num_tx_queues = 4,
.ops = &mv88e6321_ops,
},
@@ -6347,6 +6358,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.multi_chip = true,
.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
.ptp_support = true,
+ .num_tx_queues = 4,
.ops = &mv88e6341_ops,
},
@@ -6424,6 +6436,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.multi_chip = true,
.edsa_support = MV88E6XXX_EDSA_SUPPORTED,
.ptp_support = true,
+ .num_tx_queues = 4,
.ops = &mv88e6352_ops,
},
[MV88E6361] = {
@@ -6477,6 +6490,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.multi_chip = true,
.edsa_support = MV88E6XXX_EDSA_UNDOCUMENTED,
.ptp_support = true,
+ .num_tx_queues = 8,
.ops = &mv88e6390_ops,
},
[MV88E6390X] = {
@@ -6503,6 +6517,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = {
.multi_chip = true,
.edsa_support = MV88E6XXX_EDSA_UNDOCUMENTED,
.ptp_support = true,
+ .num_tx_queues = 8,
.ops = &mv88e6390x_ops,
},
diff --git a/drivers/net/dsa/mv88e6xxx/chip.h b/drivers/net/dsa/mv88e6xxx/chip.h
index 2f211e55cb47b..b861486a7065e 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.h
+++ b/drivers/net/dsa/mv88e6xxx/chip.h
@@ -174,6 +174,9 @@ struct mv88e6xxx_info {
/* Supports PTP */
bool ptp_support;
+ /* Number of 802.1Qav TX queues */
+ u8 num_tx_queues;
+
/* Internal PHY start index. 0 means that internal PHYs range starts at
* port 0, 1 means internal PHYs range starts at port 1, etc
*/
--
2.43.0
Powered by blists - more mailing lists