Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp265523lqe; Wed, 10 Apr 2024 01:06:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVuYfmuL8rFfJbrhMzDJi122aBlaggaqFJjSzyK2m0w5JwMYJDUQ41Oy6qdC7K2Qq+aeSZEdUXx/cx/vAL85aWPxSmKORpB2A8gddKd8g== X-Google-Smtp-Source: AGHT+IGp1p1ZYx1b4THyYO8emTiHuESaQay980F7IBVf6ApuHP6iiAQuq6DoAbQnUz+4adXyIJPv X-Received: by 2002:ad4:5beb:0:b0:699:2180:8bc2 with SMTP id k11-20020ad45beb000000b0069921808bc2mr2630772qvc.32.1712736393301; Wed, 10 Apr 2024 01:06:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712736393; cv=pass; d=google.com; s=arc-20160816; b=nAFXDMUgcLPZ58xU9PehcAzoSevKeNvk8oybuKQmAT7vSmwvVJ18Lxu2FVmjFDPlu4 Q/NWl+eWFohPpiLaRiFyJt+VOR/BpAugjl/RfAFXkInVWALq3lyJc/m8R9JjcDsFLzSS m4dTw534079bqTimatIDc8bSD+FNNbAxEgBLcfjzFo32NJJW+wuHCifVJ9Qx9+ieKkwM DqGyYBZJ2BH2w/bdWw4P0btY0GxICCdFqp15wQ67Uhvj6XoEDE/hlHvdFznizwfDypve aE/0qjeEOE2J8xfhFhgUTLLM3rUYcBzZAtrO/InW8ZanABOSqaMrd92BukPkDXJEdNmV zZvg== 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=mjA/bkTnRjFB9qApcZLK0isjgSyYAagPgoyvWeg/K2s=; fh=tqC39tIlS6D/RAQt4n0YdpNSF39XxlRBPCEXedsdbGs=; b=NppFsIilb9qsnP2ZbXUlwEqzyk3NK7gOyjnVXpmmYRVU8wxmKge453BEvHY2/3RPrc FjqBPhEOBBKgK/ipyClgMo4M8aHUSc27vvpwmIVlD0t2zzPfn0+jGkRWEK079mHSIyqy gvs4f0dj1IFDFn19AfzQIknw2CG8dXsbt46DRyB2Cxa6Rpa5v0sh+9/uhTFv4bWIie2W ZrjfPArcyfRkwpny/Jhi7UcdfNx5tQncCPR1n593zhH6ufkN9o7EhDQW9iKjqQSdZrIi b//VOGK1kPhH44Z0pLhPE9GN+rrg474oKlgygJ71fcPfXZnqccwbtQ6SJ95n4Fl44CyA aS7w==; 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-138136-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138136-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 s4-20020ad45244000000b0069681bbfd9csi11930594qvq.481.2024.04.10.01.06.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 01:06:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138136-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-138136-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138136-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 0C1C01C20DB6 for ; Wed, 10 Apr 2024 08:06:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 337A313D896; Wed, 10 Apr 2024 08:06:09 +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 588571C0DD9 for ; Wed, 10 Apr 2024 08:06:05 +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=1712736368; cv=none; b=W4QGi29TONVjBdvW+dp843CKt+/N3fhaHwkQN3dRZizITcuTBle27moZYh9NXhaqSoRBT30nLDfKI1Qn5QnO/aWIr3JJtvnx2846Dkzc+2eRxnZdd5L9fJsBXAJH/RAnfDrMXa7MTs7KDPPl1rochF4GQad1uU5wDCOUgR1kaQo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712736368; c=relaxed/simple; bh=/RPw2Yw9qnRBK/T7EjLpPKJxqpc/sO6jmID87i2vfv0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ms4E/mStcwFBCGwQU3X3HrIqbLyvrXUsx5oYEWPzn5b+iQzPCA6bT/0Az8XFqRIB2p8Tkweyb5/F4FMBil1JEtcAjtP0+OSOx/XetwM2iuJYcnc81IHLmyrTp1kygmSIytaGmYb4tFWHcBxlHD4Wo4gzmjBVhtpDPooJmXaNbIA= 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 1ruSy0-0004NV-Bh; Wed, 10 Apr 2024 10:06:00 +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 1ruSxy-00BSbA-1f; Wed, 10 Apr 2024 10:05:58 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1ruSxx-005Cv5-32; Wed, 10 Apr 2024 10:05:57 +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 v6 9/9] net: dsa: microchip: let DCB code do PCP and DSCP policy configuration Date: Wed, 10 Apr 2024 10:05:56 +0200 Message-Id: <20240410080556.1241048-10-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410080556.1241048-1-o.rempel@pengutronix.de> References: <20240410080556.1241048-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 Acked-by: Arun Ramadoss --- 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 8511eb052dd2e..b2159810f0ed1 100644 --- a/drivers/net/dsa/microchip/ksz8795.c +++ b/drivers/net/dsa/microchip/ksz8795.c @@ -1565,16 +1565,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