aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/dsa/microchip/ksz8795.c
diff options
context:
space:
mode:
authorOleksij Rempel <[email protected]>2024-05-03 15:13:45 +0200
committerDavid S. Miller <[email protected]>2024-05-08 10:35:10 +0100
commita1ea57710c9d9ed2d615ef0244863e6802c5a8bb (patch)
tree0b871fcdc20d2b1dd6b1cf8c7f07a2e4f8189321 /drivers/net/dsa/microchip/ksz8795.c
parenta16efc61d2895ebd9e80ec46365c70827138a1fa (diff)
net: dsa: microchip: dcb: add special handling for KSZ88X3 family
KSZ88X3 switches have different behavior on different ports: - It seems to be not possible to disable VLAN PCP classification on port 2. It means, as soon as mutliqueue support is enabled, frames with VLAN tag will get PCP prios. This behavior do not affect Port 1 - it is possible to disable PCP prios. - DSCP classification is not working on Port 2. Since there are still usable configuration combinations, I added some quirks to make sure user will get appropriate error message if not possible configuration is chosen. Signed-off-by: Oleksij Rempel <[email protected]> Acked-by: Arun Ramadoss <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz8795.c')
-rw-r--r--drivers/net/dsa/microchip/ksz8795.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
index 51b8ffe5a61f..95f5a5a9898c 100644
--- a/drivers/net/dsa/microchip/ksz8795.c
+++ b/drivers/net/dsa/microchip/ksz8795.c
@@ -179,6 +179,21 @@ static int ksz8_port_queue_split(struct ksz_device *dev, int port, int queues)
return ksz_prmw8(dev, port, reg_2q, mask_2q, data_2q);
}
+int ksz8_all_queues_split(struct ksz_device *dev, int queues)
+{
+ struct dsa_switch *ds = dev->ds;
+ const struct dsa_port *dp;
+
+ dsa_switch_for_each_port(dp, ds) {
+ int ret = ksz8_port_queue_split(dev, dp->index, queues);
+
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
void ksz8_r_mib_cnt(struct ksz_device *dev, int port, u16 addr, u64 *cnt)
{
const u32 *masks;