From patchwork Mon Apr 3 08:17:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clark Wang X-Patchwork-Id: 78411 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2147795vqo; Mon, 3 Apr 2023 01:38:49 -0700 (PDT) X-Google-Smtp-Source: AKy350YMwN0MGC7n8l6vDPFZnw6Tv4howPKXQidoxcY1jCpbw3JazGq+B5RZE9leMG47+RpxBSGJ X-Received: by 2002:a17:90b:1b52:b0:240:ab49:51a2 with SMTP id nv18-20020a17090b1b5200b00240ab4951a2mr21713299pjb.47.1680511129151; Mon, 03 Apr 2023 01:38:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680511129; cv=pass; d=google.com; s=arc-20160816; b=r4ZnEf8M8heeLVZyCxCKZSPCY6btF0lMcc5jMk4bO+Gx0lJueAL7piiPSCuoA6/zM1 VMPP4vhqDyIJmo/nbKxAtT9sBfi1QmplEsuvTyaIS4W7NY5QiL6Y447XsNBULyr6yzea fhfawgHn7GsCM0QHdOYFkyNXh7J3WDNBcBlny7euBhZ9pKodQuetOFPBhA6sK+Ez1PE1 gfL38+1jvfErSrV1oCA2qx8RGF0eCGKxb3t5uCIN38SiB1QxAqUE2FdMJzOjPN8792Xd N6pf/O4aXDaP+nXAPeX3Dh68x/vy/riFyjuXiwNZnE39dSXwpQkLQtQTgtG3Quhgb5dR vPOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=LUe9QkzdVyBtd5SVBObUM7F15wGudJIp4/sbyA5kOz4=; b=Bvvuhq/raFzGs9Gx3ml2MUBEik2nBGrhSUQAz+TC7BRClQahlerRTn3lkmYWDoZNOx 1xb7tIwh8JVwy53iDY/RIJ9Co6x4IOFhslWVVKZm53UVPEx4QR0uN55JF9fhPV0EEjuy A5TzIVmC+qzGlTSWw5oLdTLs8Fx9BbCrFgzVsHm0kmxxHLZSd/DcKpX/Q6vpd/MPbR8t xGWOw1gBAPvT5oVdXzNc6vNm3VeRjo3k8rNFvUKO0DNHqJ/lQzp6fLEUr0SJlkXGLN0e ri0nT1gOFVqR710QOL30FI3xLdKclrvjlOqPoDl9gBC6+oy0IOH6GvLLRl9thIKiEmvT j2tg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=rjmfrCXL; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bf15-20020a17090b0b0f00b00237413f8c6esi11700009pjb.154.2023.04.03.01.38.37; Mon, 03 Apr 2023 01:38:49 -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; dkim=pass header.i=@nxp.com header.s=selector2 header.b=rjmfrCXL; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231848AbjDCIck (ORCPT + 99 others); Mon, 3 Apr 2023 04:32:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231411AbjDCIci (ORCPT ); Mon, 3 Apr 2023 04:32:38 -0400 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2079.outbound.protection.outlook.com [40.107.249.79]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07B4872A1; Mon, 3 Apr 2023 01:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GTjq4CCfy94yjUKkrq3yOBX/rjwZQdu5oiUBVpfr9ZXpsg77V9UyFKnoKZDF+akWsBUShyS7iV+abKPfEcDP4qk0AoVC6f5X2KAJz6O43AIz5ANlEoyDRj0wSa4M5mBgo5v0VUjWHntfH7NxDURg/LyjlIOTcGW+Bmse0v+iKV39S4e6evEPBNleSp1BfPx4lHgTVf6khEjSMUBCNyBG/qV/7R8CMrMKjL+hw6rVcLTFQZIlMPx7V6/2qbNjgpMaCI13t1Sg6ciigpWYdKSCuPhavED/hlgH09sQgAVR9UO1RVgQwkd03CwhmMOHFo65fE4734TK9zb4+YgTR8C68A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LUe9QkzdVyBtd5SVBObUM7F15wGudJIp4/sbyA5kOz4=; b=CHkgSjHZpKgVUN7GwVBMz+BbaNZeZn2B8tE87fsUqM7LGPlF7td0dW6P15Pap0aNT5EfSxLz5skBYNk5b71/2zuhkGf31e8i4VLZ6nlBdYaMCYAicaSMt84G0Uz7vn60rGAQ+ygtDDdz0Jfg/sEnlGNHBNa9YYYvnlsYas0ANVqI4HF4ei6AUFaYiHOnYS4WG3RQ4Ar8xmVH7xzT3CEneaCtPRe7Qmv1Hm0zmziHF8sEXlB+dTa5c5+igACYnpbU1OeT2gh6o7Fe6YW2EaojCanisBs2GDL8OwUM8XlaQmFJYWuTIxFTIEgt2FY/EXDuwOTzW9bPbEkIM3GsPxH6MA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LUe9QkzdVyBtd5SVBObUM7F15wGudJIp4/sbyA5kOz4=; b=rjmfrCXLitADkTb+tu9cmx6sS6wRdln0SLKM5+ze7cL9++xRi7Cdqd9NXeH2DMiebcoW+3+GSrSqC1tZ60WX266yJJeRnG3NEA1wPGaonfbGC+b0pdnk5LgBdG+Td2cSxYISBQtddctSkGcydR827p+i1VffXYg8ZT5tnOiuqK0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB5089.eurprd04.prod.outlook.com (2603:10a6:208:c6::21) by AS8PR04MB8484.eurprd04.prod.outlook.com (2603:10a6:20b:34c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.33; Mon, 3 Apr 2023 08:32:30 +0000 Received: from AM0PR04MB5089.eurprd04.prod.outlook.com ([fe80::88b3:4064:f8d1:67bb]) by AM0PR04MB5089.eurprd04.prod.outlook.com ([fe80::88b3:4064:f8d1:67bb%5]) with mapi id 15.20.6254.033; Mon, 3 Apr 2023 08:32:30 +0000 From: Clark Wang To: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: stmmac: remove the limitation of adding vlan in promisc mode Date: Mon, 3 Apr 2023 16:17:17 +0800 Message-Id: <20230403081717.2047939-1-xiaoning.wang@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SG2PR06CA0182.apcprd06.prod.outlook.com (2603:1096:4:1::14) To AM0PR04MB5089.eurprd04.prod.outlook.com (2603:10a6:208:c6::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB5089:EE_|AS8PR04MB8484:EE_ X-MS-Office365-Filtering-Correlation-Id: 498d2df6-9eee-49b2-b39e-08db341df6eb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Xl7mGhZH4LMD4et8aLAtCEjP6WtdFIm2oZshtKo1/+DrDsLZIqwC2547eZqrK19isvBCZ+FAAf1QGHh3GJNS5QtS2ldVTGic4T47kg8NOAf6jox5Hxd8kwE5C7QtR8iZ8JB6xSyOk+kvVFxWN3GobX3iTEJSZFmwelBxEJ74FERBuNd8Z+h+mCh774SQJDryzbbTzjOcTjPggCce2m99EkFWHwenciS8FEVMgkYmcHLWBoJIJtoYzMVhtDZgI40RTRsZ96rLsD82wN/BhLVtf0tI6vb+slQuvhMSjtlbrWtgdf0oGFjI8GJnoBUFX2+USzLwPP8AeNE9/Eouogrr4LNcoDQ4fCL4Fca8dPtPDsA/86N8g92oKPehXLe+/xaSYuYfNhaTBrQhHifY9PJMztNpmkRkGyECL43cycynU5/LEO3Aw/0Df1sG4/p/8fy0qdCmbVVBzkEXdmWI5dQw1lZjWEYWlAuibfuRoCOqd6qOWcpFa3I2NPzEq3P+8RAFaX8Z00XnWeJt8JZVnG/4pPETgVWyLV1BtJodU/Agh89BSW7JGHf2EJd6WxnY+Tw2ufjdwky5qL/TLDyY5yCpz+REtrhL3So0QqNxEiq9iYuo2Yggogso8g7RkacTGuMC X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB5089.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(39860400002)(396003)(136003)(366004)(346002)(451199021)(6666004)(36756003)(2906002)(6486002)(41300700001)(4326008)(6512007)(1076003)(6506007)(26005)(186003)(2616005)(66476007)(66556008)(66946007)(8676002)(8936002)(7416002)(5660300002)(316002)(478600001)(83380400001)(86362001)(38100700002)(38350700002)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tczwPKdOFtF+vtKN4uADmcSo/RbF2QHQvP2SrSEDcWVaw1SquTr1Mjc8pSztZ7mwCP6gUL5Es/VeOkkXNf7hGgj1u/gQE5CwxOH/QFAWoB5iHHZRtx5TFD7RlXh3FtKLWR+UJkBKT5J1l1KIPcuEjQuHc0Zhn9CsXBL0VNKgaCdmjdvTrJlAKb3iry/fp0iQhlJOdSwdb00xy+N/Q7QGMLm5Mzp9WXUSHDFoZZTmkDYyHM3MA134o2ZS3V+7oUG5TGTUDkI2S9VcdmUU3g6+onOG7pXhO+zJXV8cjlqOyNMp/3Tg8633LbF7VK1FIjrf/8wrg7KRf4YNdeEm/8+AfGZTx13mQC0l0gkCSyDmRhroxZ/c8S6FmNV0/XIlkb/XdJK2oksGn/SZu7MCzhg5jC+BN03+fh3aFPHsArhNcbav98aQnj26uS+r5iSBSSHvglpRHYqR6OHdtnuJImSGt3KzUF1RRcj21v4SpMl+/t+marRYckk/e7H+lo1QPOtNw2W06BxBLeOEIFqW33e4RW/PT05cuPbe6oCOtTalp7EnD0TZ1dK8fy6DTwHZqCURWzaRraTy1xcxTUM1kxhTZ16Q26jfE8tqoTLQSqKPw1Q+B0DjGYWOVPE5Tf93IiEkdIt+3WLirg0Dlcyamsrm2VgCMiJy4zszhcVxYeMReD+IcVz0OiA6N9Y9j6J39CYuI2tTXOwZqoULtvvAJwMUQRKF4QiqHq7uHsM8X6326UkDSu/hKazlTf9WSbFpKZJiryPqfizRuHD5mhVSAc8rtGPz/GZwrNn05VPjTODcpJG3LL6I8R23JkmZKYC4Z/RxVZ5BRl4CRg0yxH3wjKDVLSEq/VuoWN+8PQnMMZL/bWc/Kc2vLcF2djqsHiIu+Yas20DxhdCr1D3p5jxVVBAL5/OH80Qh8a2LDXeigqUkhWSl4WOFzAKuwb1Jb2wj9TToT6SB2qo5hueei+V5Fhv7JCE1eSOukeU+6PiRzX9AMnMoR1qwjGYnhEc1QeBfe49ZF3D5VzyF9Sp/TYsCN8mbB4RSIkTETDEkrITRXSaFKYOKtRY06ZAmwxH43Rt9EqF7Frf8VIX7wYfb4m6Rk/vcdjI8NCgUhUO+sJHYqXCKdhZ8uYljlHZklLNKj18/OXaNDDQPUErVbPEowFlSaEBmzvxq+xqGpPph4sGAX7ikMFSGQE25kVSxSr8oVgkIL15rGjQ6d2rN1xwSGdBkMbTap+TjU89rP/oCYEITh8pMRh0VmLpB/SMiyKgPXrZJLLb7ldKahESk8VHGje6MZ8Mh21eajvorgksiZf/fL2H93XcJdbma/aJe6cKKuUG/G28hErGVp+iEUmPmH0bKNa5W61dnHhA4ciBad6v3y1AV1Qb6w81nc181rueurB+Hqlgk4XNRwS4suthMPqAdznu9IvtRSLcxMxIHUphGOwtlnE016zONkhrc2z7Z9VuSdSAczP0nBezvpYlgZlyBh5neBZps6e1fNRBxDc+KmOI/0Roem7b0z90JObWReND0SmCl0JikVhZuuVP/+2CG98Mn7+kLAFzlje8yfe0EKGgHnj7wZiuOCQ8ytlsoPEs9mwvL X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 498d2df6-9eee-49b2-b39e-08db341df6eb X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5089.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2023 08:32:30.7209 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wzPYr5ZTi3nNCcimlnM28mwNx5IGPQKUDcTBTna/toU1LLTiWIB1iYG0oe8AfR6Tg4eHqNm6Tixo3MVYQtbXtg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8484 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762143638171377695?= X-GMAIL-MSGID: =?utf-8?q?1762143638171377695?= When using brctl to add eqos to a bridge, it will frist set eqos to promisc mode and then set a VLAN for this bridge with a filer VID value of 1. These two error returns limit the use of brctl, resulting in the inability of the bridge to be enabled on eqos. So remove them. Signed-off-by: Clark Wang --- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c index 8c7a0b7c9952..64bbe15a699e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c @@ -472,12 +472,6 @@ static int dwmac4_add_hw_vlan_rx_fltr(struct net_device *dev, if (vid > 4095) return -EINVAL; - if (hw->promisc) { - netdev_err(dev, - "Adding VLAN in promisc mode not supported\n"); - return -EPERM; - } - /* Single Rx VLAN Filter */ if (hw->num_vlan == 1) { /* For single VLAN filter, VID 0 means VLAN promiscuous */ @@ -527,12 +521,6 @@ static int dwmac4_del_hw_vlan_rx_fltr(struct net_device *dev, { int i, ret = 0; - if (hw->promisc) { - netdev_err(dev, - "Deleting VLAN in promisc mode not supported\n"); - return -EPERM; - } - /* Single Rx VLAN Filter */ if (hw->num_vlan == 1) { if ((hw->vlan_filter[0] & GMAC_VLAN_TAG_VID) == vid) {