From patchwork Tue Sep 28 14:41:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12523023 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B1EFC433EF for ; Tue, 28 Sep 2021 14:45:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EEC23604D1 for ; Tue, 28 Sep 2021 14:45:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241420AbhI1Oqj (ORCPT ); Tue, 28 Sep 2021 10:46:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241411AbhI1Oqh (ORCPT ); Tue, 28 Sep 2021 10:46:37 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4AF3C06161C for ; Tue, 28 Sep 2021 07:44:57 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id y28so93049605lfb.0 for ; Tue, 28 Sep 2021 07:44:57 -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=SyJepoAP9gqp9xgp/GjgHi1fMuvyMC7LLl2uqf6Q+6k=; b=GVHGXwAsDT/eVNmLUaxXkb9bjMePwv2tWQbge/wagGCzMLSae4sqS0CySacAC3PTh4 285PCkzi699QZd4DIy7CG0iwk0WdVHDWs/Vp+i3qr24hGAVYAG62UBICdpXelLCT3Qik s0BhL7ULHKUPCGYNV4nCRDnJFSAztBNtP6vyI3ykMM6Fys3ssNSnq+GkVUUv0i26zEKQ bkyEchtrURiEcpMI/AdiegbCPy5UVV78n8IA3hTOlWggL5jkjmRNzTs3WsNT4lHPcDq2 cREOlrl1s/wETHpTW0Qq7D2z2MAcY1Ao3WVA0cSKjwGnyh+QWLHu2sJOakF16U3oepJb HhAw== 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=SyJepoAP9gqp9xgp/GjgHi1fMuvyMC7LLl2uqf6Q+6k=; b=3X5Vclnx/+ZQtZb7Oy3ZKmH/3kzIfTAwnpcKwrfpysqkWtHnvEY1loXemDZO8FDUN7 LK+bhgYNdWrT6kKhY+Qklvht+0L8ikfsMM8ePjB6tHK8FaknrpUqLP0WCZY3beyZoeXj gAO7HrieCmCnSR5HMurw0fvbYi0su6kwWqOFlzXjvSDFKK6Q5zd29YGVe8+zc61zzNPk WZ8zQW9UTDaSAKELvvSdi1+PIJy2K24PlxIVMsZYwOyWkCloz0eHxcPp/BMLfMdnfr5e OTcvmhhJjWdrRvLmLTyMfgaNPDhqwmdN9En7+LzpfABy5vjnqnJJioObo31EzQBDE1op HA7w== X-Gm-Message-State: AOAM532Ic6XBb0ze/c5emx3RACvLQX2pJfSfcL9HKxqtuG2sWk+LCyMO 7aGAqVB50CZ5o1XPU7Siy6Qibg== X-Google-Smtp-Source: ABdhPJz2ASAtwsAG1gh2UlbgkFrOEhSKwpIUUFKYNhCwpiWrrVZ+EIKe+ZQA2WlxHOECbdIAjus5Dg== X-Received: by 2002:a05:6512:1303:: with SMTP id x3mr6083260lfu.291.1632840293564; Tue, 28 Sep 2021 07:44:53 -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 x23sm1933462lfd.136.2021.09.28.07.44.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 07:44:52 -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 , DENG Qingfang , =?utf-8?q?Alvin_=C5=A0ipraga?= Subject: [PATCH net-next 5/6 v8] net: dsa: rtl8366: Fix a bug in deleting VLANs Date: Tue, 28 Sep 2021 16:41:48 +0200 Message-Id: <20210928144149.84612-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210928144149.84612-1-linus.walleij@linaro.org> References: <20210928144149.84612-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@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. Fixes: 4ddcaf1ebb5e ("net: dsa: rtl8366: Properly clear member config") Cc: Mauri Sandberg Cc: DENG Qingfang Reviewed-by: Alvin Šipraga Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij --- ChangeLog v7->v8: - No changes just resending with the rest of the patches. ChangeLog v6->v7: - Collect Alvin's and Vladimir's review tags. ChangeLog v5->v6: - No changes just resending with the rest of the patches. ChangeLog v4->v5: - Collect Florians review tag - Add Fixes tag 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(-) diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c index 0672dd56c698..f815cd16ad48 100644 --- a/drivers/net/dsa/rtl8366.c +++ b/drivers/net/dsa/rtl8366.c @@ -374,7 +374,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;