From patchwork Mon Sep 13 14:42:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 509794 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp668929jao; Mon, 13 Sep 2021 08:34:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlaFieeElbPARfryShjd++2jsPP+qnLN8ZKuqaPsOUv19ToYv5WDEF8GXZNhvtXVvPZz7W X-Received: by 2002:aa7:d796:: with SMTP id s22mr13812545edq.244.1631547272947; Mon, 13 Sep 2021 08:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631547272; cv=none; d=google.com; s=arc-20160816; b=j2L5OAb9qnUnoENUwiSWruxAQCcWYg9kgTj0+GhFeDSYN4UOMOOa/Ls/67mRMQGiv9 fvpF78q7QGTnER1KqchM3ZDMz8wiEFnz6E43kFIIpL1mssL1enOEFhvKN2GABSz4P1d9 NfyLVvP0esIOcFG1rafdqV0HnWEC7GgrqQ6PdAngKr1pHmdFGTZhPr/JP38pojlcE8Pe 8stcy6TprlzeUmsJaQ9GZkizp8wpcAxPE2rhCmIGAwkDZ4Cd1mR//5P1m5F+SQkX8+gN ZzG/KdclF0YMONMfd/0kFnnxOCtcD8hZlNy+010EqDlAvdz5QdFCthTn/RfPUasggYrC Smag== 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=Q6DknvnoVKlTPBFZkTxYtBHHlx7PNAbFfx/QOOMrkiY=; b=ltRe9xUFnBdRiMeq0ORGb0sd6+afd/VpEnhkwfSwIFb/kI4uMYULXckicA3dlRcY/U zbYrvoDWRdVFJ7bPlCPQF+HbD5y0ovHwquo2X1RVinwfQbGjayTTTuuOOK8xFqRmDOdb m76QPqeJxYsx+DLXtQXEbuJTsugUaursbn8wMMTHpkLDfxhcWGHEDBelg/BAnjFUfsrw J+Mdem51JQOruqP1g0J8GpNwY8V1zkEDK7nsH/ybcHvxFD+Oqq1ob5h0+7BJUOruTxro VIdG8ea/Nj4w84V+1gLZZOSHYG5/tkYTt/tBt63L8MTzdppqtSb31SPeYtNwUAY0cT2G f9UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tz76PsDP; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si7844974eji.452.2021.09.13.08.34.32; Mon, 13 Sep 2021 08:34:32 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tz76PsDP; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242915AbhIMPfq (ORCPT + 8 others); Mon, 13 Sep 2021 11:35:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240150AbhIMPf3 (ORCPT ); Mon, 13 Sep 2021 11:35:29 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3465DC12C759 for ; Mon, 13 Sep 2021 07:45:44 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id g1so10172854lfj.12 for ; Mon, 13 Sep 2021 07:45:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q6DknvnoVKlTPBFZkTxYtBHHlx7PNAbFfx/QOOMrkiY=; b=tz76PsDPS/GBTheceLTNvLVr1mWNVaT16nZlLvPlXVgnkDFqIv0CRujkHgmMQPPxIO ADACAfjP4v4fYePWjCNR2759Sxum4IO7vudVpR8z7fiEj+iVHcYLyiAal0l42PfS4z2Q J9aJBii6/ixwr0B85V0wOaHTjvdILL01NucMUUtkEYHYlB6rp+Dw/fYr80LYmILqQDts C9SZIC06RFSX+2SaxOxte5ILdj9yqcHuZJELqyV5CxqdYcDXHwZ5MjD6XyB7wC0BTHqh afINBfIzNIBogLAXh4V0fPC/Ego2y+Fj/xjICOEDplt2sMHt+nxxehD0bbBS7W7Aawqx eg1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q6DknvnoVKlTPBFZkTxYtBHHlx7PNAbFfx/QOOMrkiY=; b=PQcZ7mD2S3qvWAxteDWrLQDywGu3VewQGmB90gNFv0EdvwCoNV7skkyDF77oYh3Us+ RZ4wi4bGEj2Fx92kjKJGLcaBCv7eny52A90vDLwEXkjiZkSWOZ+PH649wqjS8OnjzWey bV3bXkh3r7brr+p+8Mom3pWP4xkJa43eTtz/DYYqU4tK/vf9fd+rktCFKHtkNEVrFScu FKWoBXSa6MQ99dBdjnlmePWmg6a1RTku2XZjYz6k6/LIzVTWbFjKHaxicG+sJ9WTtkIu vahZ/5wskoN5Zvv2i704sDsqv1e9/dXNUQGcjRB/Ucx500QUrQs3hYR/ZJ9Di+nbEveN Nbmw== X-Gm-Message-State: AOAM532+VOOC9IeO4C5bkx8JUnVKgzqSNTz1cezEO3SCvaIaV7m99A7o DFmhzmzphS8eMVEjuJaQEknqVQ== X-Received: by 2002:a05:6512:982:: with SMTP id w2mr9642502lft.112.1631544342603; Mon, 13 Sep 2021 07:45:42 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id i12sm849825lfb.301.2021.09.13.07.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 07:45:42 -0700 (PDT) From: Linus Walleij To: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S . Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Linus Walleij , Mauri Sandberg , =?utf-8?q?Alvin_=C5=A0ipraga?= , DENG Qingfang Subject: [PATCH net-next 7/8] net: dsa: rtl8366: Fix a bug in deleting VLANs Date: Mon, 13 Sep 2021 16:42:59 +0200 Message-Id: <20210913144300.1265143-8-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210913144300.1265143-1-linus.walleij@linaro.org> References: <20210913144300.1265143-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org We were checking that the MC (member config) was != 0 for some reason, all we need to check is that the config has no ports, i.e. no members. Then it can be recycled. This must be some misunderstanding. Cc: Vladimir Oltean Cc: Mauri Sandberg Cc: Alvin Šipraga Cc: Florian Fainelli Cc: DENG Qingfang Signed-off-by: Linus Walleij --- ChangeLog v1->v4: - New patch for a bug found while fixing the other issues. --- drivers/net/dsa/rtl8366.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.31.1 Reviewed-by: Florian Fainelli diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c index 9652323167c2..fd725cfa18e7 100644 --- a/drivers/net/dsa/rtl8366.c +++ b/drivers/net/dsa/rtl8366.c @@ -381,7 +381,7 @@ int rtl8366_vlan_del(struct dsa_switch *ds, int port, * anymore then clear the whole member * config so it can be reused. */ - if (!vlanmc.member && vlanmc.untag) { + if (!vlanmc.member) { vlanmc.vid = 0; vlanmc.priority = 0; vlanmc.fid = 0;