Skip to content

Commit 01e400f

Browse files
oleremkuba-moo
authored andcommitted
net: dsa: microchip: dcb: set default apptrust to PCP only
Before DCB support, the KSZ driver had only PCP as source of packet priority values. To avoid regressions, make PCP only as default value. User will need enable DSCP support manually. This patch do not affect other KSZ8 related quirks. User will still be warned by setting not support configurations for the port 2. Signed-off-by: Oleksij Rempel <[email protected]> Acked-by: Arun Ramadoss <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 593d6ad commit 01e400f

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

drivers/net/dsa/microchip/ksz_dcb.c

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ static const u8 ksz_supported_apptrust[] = {
8282
IEEE_8021QAZ_APP_SEL_DSCP,
8383
};
8484

85-
static const u8 ksz8_port2_supported_apptrust[] = {
86-
DCB_APP_SEL_PCP,
87-
};
88-
8985
static const char * const ksz_supported_apptrust_variants[] = {
9086
"empty", "dscp", "pcp", "dscp pcp"
9187
};
@@ -771,9 +767,8 @@ int ksz_port_get_apptrust(struct dsa_switch *ds, int port, u8 *sel, int *nsel)
771767
*/
772768
int ksz_dcb_init_port(struct ksz_device *dev, int port)
773769
{
774-
const u8 *sel;
770+
const u8 ksz_default_apptrust[] = { DCB_APP_SEL_PCP };
775771
int ret, ipm;
776-
int sel_len;
777772

778773
if (is_ksz8(dev)) {
779774
ipm = ieee8021q_tt_to_tc(IEEE8021Q_TT_BE,
@@ -789,18 +784,8 @@ int ksz_dcb_init_port(struct ksz_device *dev, int port)
789784
if (ret)
790785
return ret;
791786

792-
if (ksz_is_ksz88x3(dev) && port == KSZ_PORT_2) {
793-
/* KSZ88x3 devices do not support DSCP classification on
794-
* "Port 2.
795-
*/
796-
sel = ksz8_port2_supported_apptrust;
797-
sel_len = ARRAY_SIZE(ksz8_port2_supported_apptrust);
798-
} else {
799-
sel = ksz_supported_apptrust;
800-
sel_len = ARRAY_SIZE(ksz_supported_apptrust);
801-
}
802-
803-
return ksz_port_set_apptrust(dev->ds, port, sel, sel_len);
787+
return ksz_port_set_apptrust(dev->ds, port, ksz_default_apptrust,
788+
ARRAY_SIZE(ksz_default_apptrust));
804789
}
805790

806791
/**

0 commit comments

Comments
 (0)