From patchwork Fri Sep 24 23:36:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12517069 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 BCB24C433F5 for ; Fri, 24 Sep 2021 23:39:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9FD4C61212 for ; Fri, 24 Sep 2021 23:39:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343829AbhIXXki (ORCPT ); Fri, 24 Sep 2021 19:40:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345192AbhIXXkb (ORCPT ); Fri, 24 Sep 2021 19:40:31 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20D10C061762 for ; Fri, 24 Sep 2021 16:38:57 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id z24so47583990lfu.13 for ; Fri, 24 Sep 2021 16:38: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=6oyOVt1g+lnmeELtwPigIKUcCfyMaHiZkeh2y7CVFYY=; b=xOCL6IKYthmKz1XSjk8ogEaoN8jLKXYKWm2NjgeyV9Q+YGO+RgSAeDqd0v9YChtErz ukWDpMTpFBb3XNsSP9428IV5Z3yaNWGSlhWm3wtw5QodWxNS3aI4Pu9C3y1Icf6DHeIV j2PtlQpn1G3BYGrCGDg0eDBqh3cDjXqAIrEo0QMFcjdFJP2+tMvOaSMKwhLobwNCgzi3 FYnHFnYvHL8WmZwmonletxU3jWq1pql5cMoMfF+bTg1F9Ok0P2jR973MnvsuF67x11Nz 7DrVvKjFGSeQCq4Tu5IbpdDjeCeYAXg5jGnl1OuGV3YHSPDAgfBBKsvbPvPRYGezqMbR yLsQ== 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=6oyOVt1g+lnmeELtwPigIKUcCfyMaHiZkeh2y7CVFYY=; b=WMjsKF2U+KnoMD9p2XuKBaH5+0dJq2IBXyV3OdmsN+gqoG2XpEr9u74hcG3SsbS7X/ sQ/9SEMnfhQBz1/QdQcLOZAdzVcHgNUopWhtdj/1ibbswNdvmJw2YgxvergG+J2Dk2yq LK04zEz98lUZ+kGe5QZ0btTF8guLNZhtx64Qpz/R5fN+XJutnmOqHtkYsUOGbnA9KOrs 9/dJ4EgoKJ4GrQZdKb0AAshTbn91GSimzgOxJwb/TPsRCIho2kQcDk9rheLce9DoY6ai yHF3r0V1jHoh2ZXzpWHg6tSmd+OUVMk8UwERVrODoNwd99Afowj2TR3AaRwv68RGZuE6 JVoA== X-Gm-Message-State: AOAM532KdmrDsPPK8xmNiTNnA1KfESUcToglD7/NgBuRc0hgWLh6uEKg 17hzCRC3VlFKHjn5amVvEKjHIA== X-Google-Smtp-Source: ABdhPJztc42RLfWp0+gSplfh9/FHdGCnp8XZBhR4crJsf+v8Ig4Xi9KwwAK6KX8cCnJu18XbmKkArg== X-Received: by 2002:a2e:750d:: with SMTP id q13mr14266925ljc.420.1632526735512; Fri, 24 Sep 2021 16:38:55 -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 k21sm1176652lji.81.2021.09.24.16.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 16:38:55 -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 5/6 v5] net: dsa: rtl8366: Fix a bug in deleting VLANs Date: Sat, 25 Sep 2021 01:36:27 +0200 Message-Id: <20210924233628.2016227-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210924233628.2016227-1-linus.walleij@linaro.org> References: <20210924233628.2016227-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: Vladimir Oltean Cc: Mauri Sandberg Cc: Alvin Šipraga Cc: Florian Fainelli Cc: DENG Qingfang Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij --- 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;