Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1186122lqe; Mon, 8 Apr 2024 00:52:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWUM2X5dsfptfFdVtHgl5TWwS2Q0zh/Rn05OWOPu7PFQMyu+4ORDgoGdqI7yovND9FUI4a+3jcaq7shxaB4OUji0OcU5aX9rDgTI/E+vQ== X-Google-Smtp-Source: AGHT+IGKwJjGoH8LRu8hauNp5gdqbuW+LQOQN58xn6qXb+lEqOvgTMe/O5BthD+4JM/yz/kMTplG X-Received: by 2002:a17:90a:b311:b0:29f:ac52:9ae2 with SMTP id d17-20020a17090ab31100b0029fac529ae2mr5573950pjr.42.1712562775916; Mon, 08 Apr 2024 00:52:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712562775; cv=pass; d=google.com; s=arc-20160816; b=aOzeehRxKU6I751swBsHiDKD60Y9kL2ogPaJXjCJm8IwNxA78eMKfNZsH8IhwYae80 fWk5AWxrmhtiU7XUG6FUVGxzdgQrRWV2iih+itUK3SWLaKA2MJlO7zJjc3aWw2ttaYn3 QT7jljVu82J1QLPNeJ+JsROscB1s43vMSLsbab1essCso+Fs34eCxBkODbF2CeKq7ZdF 62dFmhHAhoV1W2Mj+BLMW8UOPUY3XPyt4Dz3AUNvj5j3VwJwbInZtIL9VtPfGCJOtnUB ztlIOt5tWLBz5oyJbYJw8coVHyamIkP1OiswIpub3bogdLN7/y0gMuWUdcxN80LQ9TEo p4uw== 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=EK0iDItWStvGLMryFVxuKfevHCPxrNADplI6AQm3uuU=; fh=tqC39tIlS6D/RAQt4n0YdpNSF39XxlRBPCEXedsdbGs=; b=mjBi27oWeGkunkOll+OE7UAg3w+JeKtejE2X2K8YRNaLZlByRrKf4A9X+QGlQgkWIh ySrk0HHMXDfkgaPBlpFL85qK6u5CGfzoctFAAXS5h+I5I34KUx9wfHeZ4w25ATAv6AYT 2EbLbBrUKmPPHuW8prnldYHsDU/eAKWo0a2srrQG4Uadeq7RdnJUmXUi2kYUYjjZ7alA j9FhOrKhrXBt8cnlE87zTANie+Ss2s4bL94217jrZhvJQCrauV9Zdx0dbcPbhNfAiDFo 72SYaemFztX2bE505VzsRwlyFC7nRB0m2knzwnOz0QoJEcTKl/NXxdBM9pNBry2Uh32J IGhQ==; 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-134952-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134952-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y13-20020a17090aa40d00b002a4abf41261si3756957pjp.89.2024.04.08.00.52.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 00:52:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134952-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-134952-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134952-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 91F5A281D8F for ; Mon, 8 Apr 2024 07:52:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68A5956454; Mon, 8 Apr 2024 07:48:16 +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 837682C68C for ; Mon, 8 Apr 2024 07:48:09 +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=1712562494; cv=none; b=BvBfck7leYS4OvYuuVV7GTs4y6CtA6dLHDEh3IosuzV51ahdsjF/xo2dc8yR7DXyRRPEMx0WvYGHRu3+JLTsTrJVA+JnMpa62TRI2Gua8zM8K1ADx7XoJeg3etz5V3xM6HNpM1VPgZ/+ysQ62rfY8uo80Yrc/jGiRI4Aa5VQxt4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712562494; c=relaxed/simple; bh=NpMdlOcVQZc93veuw+96J2FCRABIlxVlFbqGwGPqbhE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hmnWqjHC7ABp2FR3JvFglpVJnAcK7jRMcZXegHGUbNhM3IEUNprH48u1tUpv3lTpIXQSB6nCzKZjFFPXMVbADulUJDI3pumudbivf5MiwfnsgV8o5pK6M7LCDa9vjCuMstDK5PZN5+be80TwfiqjYWUeVbbAas8Ie0MJXhBHMpY= 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 1rtjjY-0005Ij-4f; Mon, 08 Apr 2024 09:48:04 +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 1rtjjV-00B4K2-5a; Mon, 08 Apr 2024 09:48:01 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rtjjV-007eyS-09; Mon, 08 Apr 2024 09:48:01 +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 v4 9/9] net: dsa: microchip: let DCB code do PCP and DSCP policy configuration Date: Mon, 8 Apr 2024 09:47:58 +0200 Message-Id: <20240408074758.1825674-10-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240408074758.1825674-1-o.rempel@pengutronix.de> References: <20240408074758.1825674-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 802.1P (PCP) and DiffServ (DSCP) are handled now by DCB code. Let it do all needed initial configuration. Signed-off-by: Oleksij Rempel --- drivers/net/dsa/microchip/ksz8795.c | 6 ------ drivers/net/dsa/microchip/ksz9477.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c index b3e256ffe98f8..15a460cf9c771 100644 --- a/drivers/net/dsa/microchip/ksz8795.c +++ b/drivers/net/dsa/microchip/ksz8795.c @@ -1564,16 +1564,10 @@ void ksz8_port_setup(struct ksz_device *dev, int port, bool cpu_port) ksz8_port_queue_split(dev, port, queues); - /* disable DiffServ priority */ - ksz_port_cfg(dev, port, P_PRIO_CTRL, PORT_DIFFSERV_ENABLE, false); - /* replace priority */ ksz_port_cfg(dev, port, P_802_1P_CTRL, masks[PORT_802_1P_REMAPPING], false); - /* enable 802.1p priority */ - ksz_port_cfg(dev, port, P_PRIO_CTRL, PORT_802_1P_ENABLE, true); - if (cpu_port) member = dsa_user_ports(ds); else diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c index 7f745628c84d1..f8ad7833f5d9d 100644 --- a/drivers/net/dsa/microchip/ksz9477.c +++ b/drivers/net/dsa/microchip/ksz9477.c @@ -1158,18 +1158,12 @@ void ksz9477_port_setup(struct ksz_device *dev, int port, bool cpu_port) /* enable broadcast storm limit */ ksz_port_cfg(dev, port, P_BCAST_STORM_CTRL, PORT_BROADCAST_STORM, true); - /* disable DiffServ priority */ - ksz_port_cfg(dev, port, P_PRIO_CTRL, PORT_DIFFSERV_PRIO_ENABLE, false); - /* replace priority */ ksz_port_cfg(dev, port, REG_PORT_MRI_MAC_CTRL, PORT_USER_PRIO_CEILING, false); ksz9477_port_cfg32(dev, port, REG_PORT_MTI_QUEUE_CTRL_0__4, MTI_PVID_REPLACE, false); - /* enable 802.1p priority */ - ksz_port_cfg(dev, port, P_PRIO_CTRL, PORT_802_1P_PRIO_ENABLE, true); - /* force flow control for non-PHY ports only */ ksz_port_cfg(dev, port, REG_PORT_CTRL_0, PORT_FORCE_TX_FLOW_CTRL | PORT_FORCE_RX_FLOW_CTRL, -- 2.39.2