Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp716972lqo; Thu, 16 May 2024 22:01:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVdVKvTbMnMKU4d50EpqiXgGfVjOuzHcVJolCa69utjNHnBvQkdQu32KWgdMFNhjbuEjus6qvi5Qqzp0kppmILwpNPj6wZO0+fQI3ezZQ== X-Google-Smtp-Source: AGHT+IGskeQMJwa9emQmPAAGawxjbm18KfQeoYrihyf2IzBSq5/+NBIER7o8Ns0VnoWOpr0VPIbi X-Received: by 2002:a17:906:f59f:b0:a5c:fe8e:cf6f with SMTP id a640c23a62f3a-a5cfe8ed230mr164538066b.56.1715922116136; Thu, 16 May 2024 22:01:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715922116; cv=pass; d=google.com; s=arc-20160816; b=IzTsUSLKqAmweRTJB8vByDBfZe/H7HYIe8qSpW5oNWH9Mt6Ekw6ggi8tXQ+CJWVGby +7AF/72GHphlVD9PI8ndmwZruCHDRYEevEmR3M0izvu4z1fetOu9nyrzT8NjwkIs8SPQ j0Ui4DdvlXkWUh4D4N2BuxFKLlSIvGLlNkmXnKIOlzqh+V/tyzhE9IBwgNRzoDSwe6Dr EZ8cEp3JG7PQ1J9NBhm+jEpkaRdb4uK3NsWqsfEvF8pf7QasJSgOeHelQr7Qxkv/HCqG me5UGiZVtx1bZYL8swa5WdgXlOa7KYQZNDMp2eNlMKn6M4CauYY/v1aEE25QZOVVUnrL p20w== 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:message-id:date:subject:cc:to :from; bh=GKNlQ68i63SVQ9jj/K7c2pORqtPyzqTHd9FW6IGJ8lQ=; fh=7SIJL1mXuvuoIXPNULLp5BVe89awL8lwwMqjLoj6zvM=; b=bBsrWwL4BNMDHoGV0E4ifc/UDVMuFSa+N10cqLutWaHwQfjpPGklXoihOZcumjLII8 xMf2ZjJakhA3ftiQhjKQDpxYzDVWgYUBq/VP1LVUbfo0X0GqbX9mHowUCaRdm/EV/a/n KZvktfATAeWb0yI3qAXPdtgjduu/qmsfJa44mfL+Dvlif9IfRIeQ0OJ/dICaxn2PHrdJ 0CYR3loHByiwmDO5TLjtpZcAcmkFkV80TYPmC48LCnDUk5YTlPvgS60a92xOvo9414Gq KsUYMI5kJpwpop5DGT7EkOM8MHvne0DEfvocAeHlH423umQCwqNYJ9fAZwH4jgzjkkEO RayA==; 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-181741-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181741-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17be6951si965218466b.792.2024.05.16.22.01.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 22:01:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181741-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-181741-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181741-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 am.mirrors.kernel.org (Postfix) with ESMTPS id D33F51F22361 for ; Fri, 17 May 2024 05:01:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77D901170D; Fri, 17 May 2024 05:01:37 +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 590D01095A for ; Fri, 17 May 2024 05:01:32 +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=1715922097; cv=none; b=fM8uq22FRkL+iMDtZT2wXoblhXKwzqNdeDdcO2lM0vgKDNZ316R5gnU5McoshwW7/nUL9lVThDbGnkYHtrDeiRoU1ZKba7XeosuIuVTr5rPo836uuwtjkPo5gY0IS3uSC92MJqDz3v5nWOHczCjkSRsv2nwyK5tBj+TFGKUPmQs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715922097; c=relaxed/simple; bh=Q++9aS+kx2YZlIKGrDvxJlGOFReUULix7E6oSVQC3wE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=RXzASX+VnMUrR7aXzjZN4mlOYbExIUGrT4F8KCYWnWiSLk24nsmZe2Po570eJBa/9cqmcwlWRVoae2p02f/jixrXSPzCHuDNx7UI03GGDSv1n6m+XQXx+Nmc7k0v4trm9WmhMmWCpCACHm+UizKP7jpHzWPwg83z5IOifg6sFhU= 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 1s7pif-0001c9-ST; Fri, 17 May 2024 07:01:25 +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 1s7pic-001p0g-BX; Fri, 17 May 2024 07:01:22 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1s7pic-0097fT-0u; Fri, 17 May 2024 07:01:22 +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 , Hariprasad Kelam , 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 v2 1/1] net: dsa: microchip: Correct initialization order for KSZ88x3 ports Date: Fri, 17 May 2024 07:01:21 +0200 Message-Id: <20240517050121.2174412-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 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 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: a1ea57710c9d ("net: dsa: microchip: dcb: add special handling for KSZ88X3 family") Signed-off-by: Oleksij Rempel Reviewed-by: Hariprasad Kelam --- drivers/net/dsa/microchip/ksz_dcb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/dsa/microchip/ksz_dcb.c b/drivers/net/dsa/microchip/ksz_dcb.c index a971063275629..086bc9b3cf536 100644 --- a/drivers/net/dsa/microchip/ksz_dcb.c +++ b/drivers/net/dsa/microchip/ksz_dcb.c @@ -805,5 +805,15 @@ int ksz_dcb_init(struct ksz_device *dev) if (ret) return ret; + /* Enable 802.1p priority control on Port 2 during switch initialization. + * This setup is critical for the apptrust functionality on Port 1, which + * relies on the priority settings of Port 2. Note: Port 1 is naturally + * configured before Port 2, necessitating this configuration order. + */ + if (ksz_is_ksz88x3(dev)) + return ksz_prmw8(dev, KSZ_PORT_2, KSZ8_REG_PORT_1_CTRL_0, + KSZ8_PORT_802_1P_ENABLE, + KSZ8_PORT_802_1P_ENABLE); + return 0; } -- 2.39.2