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: 12489747 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 X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C82A9C433F5 for ; Mon, 13 Sep 2021 15:34:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE70361051 for ; Mon, 13 Sep 2021 15:34:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242915AbhIMPfq (ORCPT ); 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-Google-Smtp-Source: ABdhPJx0mZrAeTM5vvsM0PTWilljt9AhbMGzJay8x22RXWh4x6YxUfcrqSv1M3YW28rv98h0IDElbA== 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 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. Cc: Vladimir Oltean Cc: Mauri Sandberg Cc: Alvin Šipraga Cc: Florian Fainelli Cc: DENG Qingfang Signed-off-by: Linus Walleij Reviewed-by: Florian Fainelli --- 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 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;