Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp108900lqo; Thu, 16 May 2024 00:09:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXAQ5sEcurCJnddcrHDUR+mamLYTdoOlUnrwhMYzeVbdCsIxt6qyeUGQZuHVXmOQxsvsJ9/2XJZp8j3ouvlf1rtXpqxqT6vg/Vt5JtGYg== X-Google-Smtp-Source: AGHT+IHgozb1FZ4OOH4u4AoX1eMSjAL1X9qXI2tdyYCI8WIlymIBge2nF3GI5Bnu7fruE/YwBYpc X-Received: by 2002:a17:906:3e08:b0:a5c:de12:5fbb with SMTP id a640c23a62f3a-a5cde12605amr153403566b.50.1715843354660; Thu, 16 May 2024 00:09:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715843354; cv=pass; d=google.com; s=arc-20160816; b=BKSOyHqhVaB7pWaM5q/jSS33FIo2vwfRiwR17bgUTf2i97To8eBHfzwpGejSzUPGfX p2t02Ni4Z5fFnw2+MsiaFjq86USVdT1x5p9VKMq1du4ZpW0eMzwa7uuZdiJIgnltQluv SiPoJcbY7deX8jL2QSQfwn89EhmzdsNC0hMQMiTY+4YSGO4khVrD0QIfky+OR+Bs56Dn IKQJnWwfuQZp7UMiJpc9944N/CNuZop7JJW6my5x194Hk8l/ry7pnPqU9Cxi3W1OH7El I/X+LqsKKAkkhN3BigNpNRReq6Sj0HL/YluGctkFOrJS7jHId4mCFkExFoikGZ8QSOtp sz2w== 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=DVfJIwKMmroAjQl9368E59keZfan8ZhR2V+JL4lMpZs=; fh=tqC39tIlS6D/RAQt4n0YdpNSF39XxlRBPCEXedsdbGs=; b=jTWGGbIvWFv1FfuRbFlNc5as5C7rzAj25i7CfG7mN5ONbbfqdsZVleu8ytsc+XJwbC Chukliys68WQcFVTorhP/BrT13RZfSq2nmnDANqnlTSZRQVi0F5QMbuWRSrgrUoS4aEP nQxAm9qf/rOVTqbo+ZKSkAH3ovdOGP/We1L3DpYtPv4yRhI65kbZINwpw3gpmLZwYHQY Am9hAoXce8XHnIPMi2D60bZ7ZAgr6VJNerHoe5pRvYpxUHBrschWk+pziNA1hQAjDa5w HWws1ujRuNcvVZGtTJMaYR9T8lEPF60zT3sUDaHnhM4Aa7Eea1E5YxCKPstTJJw+ZWCp q9lg==; 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-180689-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180689-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17945d8bsi834324866b.14.2024.05.16.00.09.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 00:09:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180689-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-180689-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180689-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 655F11F2200A for ; Thu, 16 May 2024 07:09:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8857C2A8FE; Thu, 16 May 2024 07:09:08 +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 8526625760 for ; Thu, 16 May 2024 07:09:04 +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=1715843348; cv=none; b=p9LFv5B02I7NHBhVfp93At4NSJGS4nLAhaCRcJ0T6nKXIewqpxHXfj//AKIwUJD0xWJkWM/i6nOSlr3bY28Sj2V/ts1VubJyeiUeQkzyZY8K7QkI8L8FpwRE7sVwyflqnzwt8rEAQSQC+jFCAyJFw+j9k+BfRZYPnhxJYYyPaK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715843348; c=relaxed/simple; bh=f3MDXizVpz5AMps7xWG2L7B0OhEHYRetsA5RWxit9fg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=clpdvJLojMWEm+NYaN65FqkZA/UVPv6vbkeCDHLxqAwH4IJXA9Tn5LSan0r8sFBesmYtBAa95Qn87QuLhpLVvi0mB6LMvH1nehYtELmGVTkyo5g21UF7MtMO07yZC35r2vsA3It5FPlUzrkLwOqSudVjozAkopvcy3uSmIuOJUw= 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 1s7VEV-0006C4-R4; Thu, 16 May 2024 09:08:55 +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 1s7VET-001fTT-No; Thu, 16 May 2024 09:08:53 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1s7VET-008CG3-21; Thu, 16 May 2024 09:08:53 +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 v1 1/1] net: dsa: microchip: Correct initialization order for KSZ88x3 ports Date: Thu, 16 May 2024 09:08:52 +0200 Message-Id: <20240516070852.1953381-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 --- drivers/net/dsa/microchip/ksz_dcb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/dsa/microchip/ksz_dcb.c b/drivers/net/dsa/microchip/ksz_dcb.c index a971063275629..19b228b849247 100644 --- a/drivers/net/dsa/microchip/ksz_dcb.c +++ b/drivers/net/dsa/microchip/ksz_dcb.c @@ -805,5 +805,18 @@ 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)) { + ret = ksz_prmw8(dev, KSZ_PORT_2, KSZ8_REG_PORT_1_CTRL_0, + KSZ8_PORT_802_1P_ENABLE, + KSZ8_PORT_802_1P_ENABLE); + if (ret) + return ret; + } + return 0; } -- 2.39.2