Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp934179lqo; Wed, 8 May 2024 22:33:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXFLfjkEJiTuiYYYeTwGkjN+jHUs1LHqON8JVhuPkT2zVt6rUV7J1BLq+wAOxFXM3pDqaFlDo+YRltKQbLe8aWiGowB9Q9XvRvDiY0pNQ== X-Google-Smtp-Source: AGHT+IHAeEUou+wr5bTBh/WEasYr/38+DY48jYDZ2VdbDb1NBrNd7RRRLhDdTHnfz94DPohQJxyz X-Received: by 2002:a05:6214:c45:b0:6a0:e2ca:1e69 with SMTP id 6a1803df08f44-6a15145db37mr39657766d6.29.1715232837709; Wed, 08 May 2024 22:33:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715232837; cv=pass; d=google.com; s=arc-20160816; b=Rz3R+KWzYme9kJALFedtB7imVoKN5rmqV5chxdfVYUKKcoLO8KJHbIb0N+ylRnVcd4 gHWoV1//oaPcsOqXm5uUHNtLTrRXj/LkptuchGEofXTcsa5aczq7efivdszxCdPkqJkd LcpnDwbhowaFmBLGxHu/VPK2PCVOsjps4eiLz5vi6Oxqr9Lb1nk5QGDSZU99zXIbSeKB QU0yXGNb9QmFQVDCeWtbp71kgeK/UZJPJODQ6gXuYMyQzoCcSSf1e/rzOFLHlVl8CB6R Zu+j1rgZ7H+h79hBcM46GolnSuQbru3o4buEnAAVlplD398UktbrDGGEjE94bLum2tmV EFhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Ns9sPZmdCk6lBIPU9Oaow7hNHA2Zwy5pvazfTh0YFGI=; fh=tqC39tIlS6D/RAQt4n0YdpNSF39XxlRBPCEXedsdbGs=; b=rjj9EtgnWjKZdgAtaW5ZmtI/GwOaasupg26cEqTPzU+pdbG1WF9aYS6bqD5/nR+EVx 8/+bCo652cPMlq8Tu/aPpbCErPL5nPNJX6NjYWZHxdXJT3jsBKp61l0RjV6a3K13I/uQ IWPtnm2atXpiXAaXLJwek7E9f+emI9VTG6QDqDWWRToM6xuVS+pd4k1r+Avu2u+UlBnb F57iqpKH04mYK41QtilMYqCNzSM3G4jXbVRwPssuM2J3E3bBaIjKs6FvXknuZu95NBoS 7RbOK5dxYypI0NXkHPiPj5M3HQQto6cb6N6Lzubm62wh1UhW2Q8X3xgEuLiK6dkU+7yd yXSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-174157-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174157-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f29aac7si6947346d6.199.2024.05.08.22.33.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 22:33:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174157-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-174157-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174157-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 70D6C1C228DC for ; Thu, 9 May 2024 05:33:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2CA9B1494CF; Thu, 9 May 2024 05:33:44 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BED71494A6 for ; Thu, 9 May 2024 05:33:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715232823; cv=none; b=PuhaXaodAXyBgS9lIusbhKOmAldbBeWJJnw8Tl5/0fegd4U+weGiCGjj5AvNe3oPjC+LtMVYJ6+PjpOWhnld+9RZZMkUOUa+66Y7vzjN4jkcg3mzG6MOF8FNpGAxsNziVHF0EOPttq3AWUDgFdM/kaBilgd8oPl7U5TOV5GvLFc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715232823; c=relaxed/simple; bh=9TgtwrptwMcS3xm6QIxccK+KaGlkKIOHI+/pkhA276s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VS6zZxGr6X+RQy/Sh0SSnqWqgReBio0AEYDpGnXb6e+BuhMqKMu/kdn89KJQGRsdA+caXDxjevmKCQ0cYdEdj0aqbJtjUA8oNsw/bc61IGpOJNf8PDLiYcLRZ3SCWKP+rBLHLPDEw4jUQqqSCNDjva8F+3DpxZ+EwKZN8c+eUq0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s4wPR-0006ks-81; Thu, 09 May 2024 07:33:37 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4wPP-000P92-Va; Thu, 09 May 2024 07:33:35 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1s4wPP-000XZZ-2v; Thu, 09 May 2024 07:33:35 +0200 From: Oleksij Rempel To: "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Woojung Huh , Arun Ramadoss Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, David Ahern , Simon Horman , Willem de Bruijn , =?UTF-8?q?S=C3=B8ren=20Andersen?= Subject: [PATCH net-next v2 3/3] net: dsa: microchip: dcb: set default apptrust to PCP only Date: Thu, 9 May 2024 07:33:35 +0200 Message-Id: <20240509053335.129002-4-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240509053335.129002-1-o.rempel@pengutronix.de> References: <20240509053335.129002-1-o.rempel@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org 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 --- drivers/net/dsa/microchip/ksz_dcb.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz_dcb.c b/drivers/net/dsa/microchip/ksz_dcb.c index 07f6742df41bd..dfe2c48e1066a 100644 --- a/drivers/net/dsa/microchip/ksz_dcb.c +++ b/drivers/net/dsa/microchip/ksz_dcb.c @@ -82,10 +82,6 @@ static const u8 ksz_supported_apptrust[] = { IEEE_8021QAZ_APP_SEL_DSCP, }; -static const u8 ksz8_port2_supported_apptrust[] = { - DCB_APP_SEL_PCP, -}; - static const char * const ksz_supported_apptrust_variants[] = { "empty", "dscp", "pcp", "dscp pcp" }; @@ -771,9 +767,8 @@ int ksz_port_get_apptrust(struct dsa_switch *ds, int port, u8 *sel, int *nsel) */ int ksz_dcb_init_port(struct ksz_device *dev, int port) { - const u8 *sel; + const u8 ksz_default_apptrust[] = { DCB_APP_SEL_PCP }; int ret, ipm; - int sel_len; if (is_ksz8(dev)) { ipm = ieee8021q_tt_to_tc(IEEE8021Q_TT_BE, @@ -789,18 +784,8 @@ int ksz_dcb_init_port(struct ksz_device *dev, int port) if (ret) return ret; - if (ksz_is_ksz88x3(dev) && port == KSZ_PORT_2) { - /* KSZ88x3 devices do not support DSCP classification on - * "Port 2. - */ - sel = ksz8_port2_supported_apptrust; - sel_len = ARRAY_SIZE(ksz8_port2_supported_apptrust); - } else { - sel = ksz_supported_apptrust; - sel_len = ARRAY_SIZE(ksz_supported_apptrust); - } - - return ksz_port_set_apptrust(dev->ds, port, sel, sel_len); + return ksz_port_set_apptrust(dev->ds, port, ksz_default_apptrust, + ARRAY_SIZE(ksz_default_apptrust)); } /** -- 2.39.2