Message ID | 20230324080608.3428714-7-o.rempel@pengutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp457792vqo; Fri, 24 Mar 2023 01:19:46 -0700 (PDT) X-Google-Smtp-Source: AKy350Z9ZF3AeEAgTFdUW0BPtDcXVHZjeCP6cCOutS56Ryw18hKccDELTwH5PRGzCl2TEFGAH1qO X-Received: by 2002:a62:1c04:0:b0:625:d697:c386 with SMTP id c4-20020a621c04000000b00625d697c386mr2089847pfc.22.1679645985952; Fri, 24 Mar 2023 01:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679645985; cv=none; d=google.com; s=arc-20160816; b=vt1FYTV7kaGQrzPvxeAc3T3/00NebZ0p3oMfGVp2+xdKa4geXs+rMGxzRBBPrBFmTV uUCEyYRBo6e3bjE/pjjrJ13YgXdHEgPOCyhKrE0szPRVQ1NyR6XmJveka3xlxz+ORY3C SfgnTIQ3ZrbsadHwTarENvqmWr9I2I1pmln7Hmbrgjl9GuHiHmfkPsTU4EMEA+SD2Qlr QTbiKv/ECFLYxrsm7wPTbRHbqf43rWchPeovgHdrV50OWCNK2pWSLj+zE4VECpkTm7zZ 0ofeRuWtU5yNoD4q8RSCEwSFCvzzgZk5miRUulzAc8MtP4AKmL2ywV3DGuIhn/vxPfZt ZetQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=eL/wmCqZYceozP9i08o+0vL2IqZsVGtY/7AsGOmqP6k=; b=TE1DibYJHgfG5372nWOKR28OZFKRA7j3Abo5Yq0aEZIqD04IOiNcrt4bCQBAJ1gEY3 i6K4CQOJDdTmK6Ch4++gPYl3AhOyOHJFtm6XyZa/Kps9rPO69Qx4ULNkv1IOZDlDnkEF Z1GJkv2PbJ9WCVEiIhqHTRhhZJarhoSeIrKzdBIi9yK/mQf5M0XD5/lEtLKL/z8et27c obR3iFqA5wiG4BuxrOqGMVznW4jLLzAtPnhTVNm0LndQF6ntFbxi3YYzLtnQ/SxMxN4n 0Czr21JWBjmAHqywoK2keH0svGZNowId7UNz+dOH+4O8vPkMjlIAda47a8qWziu7ElQj Szzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d13-20020a656b8d000000b0050bf225ba32si19966608pgw.706.2023.03.24.01.19.33; Fri, 24 Mar 2023 01:19:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231616AbjCXIG0 (ORCPT <rfc822;ezelljr.billy@gmail.com> + 99 others); Fri, 24 Mar 2023 04:06:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229938AbjCXIGV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 24 Mar 2023 04:06:21 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E35623864 for <linux-kernel@vger.kernel.org>; Fri, 24 Mar 2023 01:06:20 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ore@pengutronix.de>) id 1pfcRB-00077T-IU; Fri, 24 Mar 2023 09:06:13 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1pfcR9-006KcV-8y; Fri, 24 Mar 2023 09:06:11 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1pfcR7-00ENzh-K6; Fri, 24 Mar 2023 09:06:09 +0100 From: Oleksij Rempel <o.rempel@pengutronix.de> To: "David S. Miller" <davem@davemloft.net>, Andrew Lunn <andrew@lunn.ch>, Eric Dumazet <edumazet@google.com>, Florian Fainelli <f.fainelli@gmail.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Vladimir Oltean <olteanv@gmail.com>, Woojung Huh <woojung.huh@microchip.com>, Arun Ramadoss <arun.ramadoss@microchip.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com Subject: [PATCH net v2 6/6] net: dsa: microchip: ksz8: fix MDB configuration with non-zero VID Date: Fri, 24 Mar 2023 09:06:08 +0100 Message-Id: <20230324080608.3428714-7-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230324080608.3428714-1-o.rempel@pengutronix.de> References: <20230324080608.3428714-1-o.rempel@pengutronix.de> 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.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761236469397963113?= X-GMAIL-MSGID: =?utf-8?q?1761236469397963113?= |
Series |
net: dsa: microchip: ksz8: fixes for stable
|
|
Commit Message
Oleksij Rempel
March 24, 2023, 8:06 a.m. UTC
FID is directly mapped to VID. However, configuring a MAC address with a VID != 0 resulted in incorrect configuration due to an incorrect bit mask. This kernel commit fixed the issue by correcting the bit mask and ensuring proper configuration of MAC addresses with non-zero VID. Fixes: 4b20a07e103f ("net: dsa: microchip: ksz8795: add support for ksz88xx chips") Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com> --- drivers/net/dsa/microchip/ksz_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 3/24/23 01:06, Oleksij Rempel wrote: > FID is directly mapped to VID. However, configuring a MAC address with a > VID != 0 resulted in incorrect configuration due to an incorrect bit > mask. This kernel commit fixed the issue by correcting the bit mask and > ensuring proper configuration of MAC addresses with non-zero VID. > > Fixes: 4b20a07e103f ("net: dsa: microchip: ksz8795: add support for ksz88xx chips") > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> > Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 4929fb29ed06..74c56d05ab0b 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -404,7 +404,7 @@ static const u32 ksz8863_masks[] = { [VLAN_TABLE_VALID] = BIT(19), [STATIC_MAC_TABLE_VALID] = BIT(19), [STATIC_MAC_TABLE_USE_FID] = BIT(21), - [STATIC_MAC_TABLE_FID] = GENMASK(29, 26), + [STATIC_MAC_TABLE_FID] = GENMASK(25, 22), [STATIC_MAC_TABLE_OVERRIDE] = BIT(20), [STATIC_MAC_TABLE_FWD_PORTS] = GENMASK(18, 16), [DYNAMIC_MAC_TABLE_ENTRIES_H] = GENMASK(1, 0),