From patchwork Sat Sep 25 22:59:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12517853 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 175D0C433EF for ; Sat, 25 Sep 2021 23:02:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0204560F11 for ; Sat, 25 Sep 2021 23:02:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbhIYXDh (ORCPT ); Sat, 25 Sep 2021 19:03:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230207AbhIYXDd (ORCPT ); Sat, 25 Sep 2021 19:03:33 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B656C061740 for ; Sat, 25 Sep 2021 16:01:58 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id u8so56650933lff.9 for ; Sat, 25 Sep 2021 16:01: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=aEbVU1x57FyQIizkQNokEr+/kzDXEj5p9oOADNfgO3o=; b=zX1p4w34JlmsFP7th4iRnPU5Y4gl28/MSTRDbgahObrRZfeFcQyp6Cun1uLuL7ZRgh XbJxbpvTZbZnEIWY2HFP6Zzz9vUzAvofY1tFRt+RfmKRoyKQ0iLkq/Z+8P6QemaaNZ3X mWkgtzYUu6QeHzDBEH5rX8foGmgnIB11UFOq9eTIHts7uxVfwnH1X4zuMzPWkFRgGu+H aUCobVYvXUp/q2qc2xp7IcfhexaHR+4Zj3RuvMrOOMS1L400UjzM1HnPQr8ZCdJiJ4ks 6ZMelXBsdiApbiXWc4nQVTuLLbPrC3kDNXv1xSeSQGJfHFrwadRiPGe67br4+YMMQ1up VPUA== 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=aEbVU1x57FyQIizkQNokEr+/kzDXEj5p9oOADNfgO3o=; b=1T+wo85zg/E+3matGmqU8QBLe5jBv1F3csZIN/B5gpUgQdPPyVCgsWS0KNkVbbJvK7 OQfX+5++RqzCX4C6PXh4c7rwlz0Rmu2poAHtNajl2a6fVGHS2MHiN/RNcA8y5VS8uEFD NQtXE38DjGrWxKtDn4sj0cJT8Uvn1+NVbOMMX7qhrBPJwTy7g5wjIP+KP82HOEzLlLQI PwNhgynN8TrW8njbrX9ncbKYRDeknjUvB+HNrHpMI28QzKgVToGVpAt0pgrCpleXCjjA 7jq6hoMqLckHtN6MKU18ubfuBxse7nDoypPYUbwyWG3EgczURUsLLGjKynj93yCwxuD9 4rTw== X-Gm-Message-State: AOAM533DWkKwABE0DoOFBmmvw4HATpp+fOv9rdYI2oacSDnDRjpLF4D7 RYySW17NvdcjCt3OvE1UOMPaQg== X-Google-Smtp-Source: ABdhPJwDqY/bvnYEB/DKhjlyKyxRgsOqz6eea6upk2iBm0uH2vCWDrMsBQmvwsAjBBBMCYbMUzwV1g== X-Received: by 2002:ac2:5e23:: with SMTP id o3mr16860180lfg.352.1632610916457; Sat, 25 Sep 2021 16:01:56 -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 d27sm1448111ljo.119.2021.09.25.16.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Sep 2021 16:01:56 -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 v7] net: dsa: rtl8366: Fix a bug in deleting VLANs Date: Sun, 26 Sep 2021 00:59:28 +0200 Message-Id: <20210925225929.2082046-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210925225929.2082046-1-linus.walleij@linaro.org> References: <20210925225929.2082046-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 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;