Skip to content

Commit f0fa841

Browse files
oleremkuba-moo
authored andcommitted
net: dsa: microchip: Correct initialization order for KSZ88x3 ports
Adjust the initialization sequence of KSZ88x3 switches to enable 802.1p priority control on Port 2 before configuring Port 1. This change ensures the apptrust functionality on Port 1 operates correctly, as it depends on the priority settings of Port 2. The prior initialization sequence incorrectly configured Port 1 first, which could lead to functional discrepancies. Fixes: a1ea577 ("net: dsa: microchip: dcb: add special handling for KSZ88X3 family") Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Hariprasad Kelam <hkelam@marvell.com> Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com> Link: https://lore.kernel.org/r/20240517050121.2174412-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 31279b0 commit f0fa841

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/net/dsa/microchip/ksz_dcb.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,5 +805,15 @@ int ksz_dcb_init(struct ksz_device *dev)
805805
if (ret)
806806
return ret;
807807

808+
/* Enable 802.1p priority control on Port 2 during switch initialization.
809+
* This setup is critical for the apptrust functionality on Port 1, which
810+
* relies on the priority settings of Port 2. Note: Port 1 is naturally
811+
* configured before Port 2, necessitating this configuration order.
812+
*/
813+
if (ksz_is_ksz88x3(dev))
814+
return ksz_prmw8(dev, KSZ_PORT_2, KSZ8_REG_PORT_1_CTRL_0,
815+
KSZ8_PORT_802_1P_ENABLE,
816+
KSZ8_PORT_802_1P_ENABLE);
817+
808818
return 0;
809819
}

0 commit comments

Comments
 (0)