From patchwork Thu Feb 2 12:59:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rakesh Sankaranarayanan X-Patchwork-Id: 51914 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp228572wrn; Thu, 2 Feb 2023 05:12:24 -0800 (PST) X-Google-Smtp-Source: AK7set/ekMmcqKkhLeUD9gtNf0NZ9Vp+F7hrCx4M8FKa5C0z34j3OGGISYmhbt4s3+pXJGK7QjQ7 X-Received: by 2002:a17:907:7672:b0:88d:f759:15b0 with SMTP id kk18-20020a170907767200b0088df75915b0mr6150467ejc.45.1675343544564; Thu, 02 Feb 2023 05:12:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675343544; cv=none; d=google.com; s=arc-20160816; b=CsktT+BgiHWIHdnKF3OgMDqv5HRD4nbD0DhDfEGb7Oyl9SJ1iDjjVg3N/5Z4dxMxGD iIKjT5rGILUH/Njinib+qK5FGaCqoIdwWaFBIEA56mAF69AZX1CM08fjbTnSOvSRyriL 8vybewZ+txHOR3v0ef/nFjU3A+Fju0bb/5S5Nc2mNHQAcZ2d9aZiZrq0SGvuWKQURC/P 5F4JyARciW1qiihWajsM5mM1oGTixYRWomTr9/8jCU0CeMlgiCVuEtB/n6kY1u2awcOF VuHPFfLLypBUCOTRhF/KoA+8ruOqpethWf4D6v6PCYIzIR0G7SmioM/SsNbCYngMOPgL UelQ== 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 :dkim-signature; bh=jmWdhuXej2lE82e1UgIiq0OzBac4V5Mi9S4YhCrSSik=; b=zM2bUeQw73X5G1C83QXaJXpYfz6dP0lcPBiDgCXzURhD7gJpW1MxutbiUNkJR4Rzp0 85hUiilPNgyrRfFyA3wFKUJ9QNGdcEBxHc+BV7pFFt9UegjeQYHink3qgaqzRPGWlSti YwVzXk2/qfADZTImmiLN/KEYptq/EmOzDvXqZIXh4yCt8L0dL9BGS4X72SX0kYnFkKjC uw+X4CoxEED10Nilcx3RvuOqtwtYwNDGT6ZPu1MIZZ+koOb5Fz4+1ic8Y8EBHHnbRap6 Op5yttRHq1rnmHermFhya5nF/UPD9HYwU4U/FIuBubanh8vzelbvUhLYriVt/1FbwO1V rrwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=jblrvlrd; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 19-20020a170906225300b008786aea6a6dsi28630903ejr.17.2023.02.02.05.11.57; Thu, 02 Feb 2023 05:12:24 -0800 (PST) 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; dkim=pass header.i=@microchip.com header.s=mchp header.b=jblrvlrd; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232630AbjBBNAP (ORCPT + 99 others); Thu, 2 Feb 2023 08:00:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232591AbjBBM7t (ORCPT ); Thu, 2 Feb 2023 07:59:49 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37BC68C405; Thu, 2 Feb 2023 04:59:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1675342762; x=1706878762; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ouumZ6vbUvawBmcL9NxoUu7tYtFUqagkN0ir03uG0JE=; b=jblrvlrd04/sJWl2s+iqEKMS0szsyJcqY2/Jv55Ru1z9VoM/2k7kLdtd ENq7di3NJLKt3AuSZg8QSM2RzgtoMSbNLf5CrDdJIgtCIhxXyLW2ouXAm wEcU3yG1SikMA8MFXa6aT22GVF78fAcNmszb1TliXdRFzQwD/EjcrUUhI UJ+ChakIXLnUz0XIh5Vd925PvXIVAl94CQbKN+zZ6/CItynADBAwdIl0C jpYUD6uZttHPFLtSlK94NSDkNTY0DycABzxK8cSlVJDFjVZ4Lk6H5EusR k+7hruLPc2gpg11IlAQ9lATIh/Ne3SYihktinr9CgPRHjSOBwnm1k9Pif g==; X-IronPort-AV: E=Sophos;i="5.97,267,1669100400"; d="scan'208";a="135252070" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 02 Feb 2023 05:59:21 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 2 Feb 2023 05:59:21 -0700 Received: from che-lt-i67786lx.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Thu, 2 Feb 2023 05:59:16 -0700 From: Rakesh Sankaranarayanan To: , CC: , , , , , , , , , Subject: [RFC PATCH net-next 10/11] net: dsa: microchip: lan937x: update vlan untag membership Date: Thu, 2 Feb 2023 18:29:29 +0530 Message-ID: <20230202125930.271740-11-rakesh.sankaranarayanan@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230202125930.271740-1-rakesh.sankaranarayanan@microchip.com> References: <20230202125930.271740-1-rakesh.sankaranarayanan@microchip.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756725032827019398?= X-GMAIL-MSGID: =?utf-8?q?1756725032827019398?= Exclude cascaded port from vlan untag membership table since it will be the host port for second switch. Here setting 1 means, port will be capable of receiving tagged frames and 0 means, port can not receive tagged frames. Signed-off-by: Rakesh Sankaranarayanan --- drivers/net/dsa/microchip/ksz9477.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c index bf13d47c26cf..4c12131098b1 100644 --- a/drivers/net/dsa/microchip/ksz9477.c +++ b/drivers/net/dsa/microchip/ksz9477.c @@ -399,7 +399,7 @@ int ksz9477_port_vlan_add(struct ksz_device *dev, int port, vlan_table[1] |= BIT(port); else vlan_table[1] &= ~BIT(port); - vlan_table[1] &= ~(BIT(dev->cpu_port)); + vlan_table[1] &= ~(BIT(dev->cpu_port) | BIT(dev->dsa_port)); vlan_table[2] |= BIT(port) | BIT(dev->cpu_port);