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: 514615 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp1777547ejj; Fri, 24 Sep 2021 16:39:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJetk060cU2oslAxyAzWg7AdFdbihQPRi6/BziG8uo9AYo2mxtlLhmvO8Dvxhim8nGs6Xh X-Received: by 2002:a50:aa9c:: with SMTP id q28mr7976164edc.199.1632526745877; Fri, 24 Sep 2021 16:39:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632526745; cv=none; d=google.com; s=arc-20160816; b=mo5KmgdfKoeQKY0ThoVHHKHyvg1586z7QeEkUnihdz6OnRB604sATKngst7d4bw1Fr 5JyphUrOvkW2VCYwsWymTipjDo2ymjCOLGKW3aW0i7RxIFlqW4GYPiZ+/gEUKnvHoXQ4 jlb6bOd6uD03SgxDJzEfVEv960NeIBgMSHSyaVm4QZJ5DNUq+ZFmxQgYAVlQkkPtJ1IX 17MT/B9fPt3xbxqbbnCWrgYsyu8srJmdmyF43MG25EUjTJxkuF+UzkJhnvDn2gvzQJeh G3Tb9i7sl7GHRPKpRAQxa9X4l7D1g6RroVcZ7P9W8mSrDVI7PNGKppPMbSSEUaXDJ3T7 Pi0w== 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=6oyOVt1g+lnmeELtwPigIKUcCfyMaHiZkeh2y7CVFYY=; b=sYL72JmKoozytamqXS5uSt9d+0EvjiMoAISrH7SMFos0RauCWLEgXZL3c5ADWGAKQ7 WD1N8EhPCLD2SjCbiPo2haHotwI8KCmJChgcxWnMhPWqLpfxUf74JEq3TpHLnzKnDFFU JmVNJ8sM5KndVASQqbh1KtCmxWoE2Mfrfr0NOZFkROli+WbuIHdZVsCjTMxEzemq4BsV 6jsG8akcfn8skhQjua6iJjrSdbyhg5Tth7MyMsbk5c/kTCC6hjeCp/fj2lbYfaYAVgUP yd4vbpbTUgCGMnuEcg/pbDIInewZ/wx1Emym6Ch4hb+9sQoy1BM/hGePxiHoyBLGMpSj 9V9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xOCL6IKY; 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 a11si10803843edx.158.2021.09.24.16.39.05; Fri, 24 Sep 2021 16:39:05 -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=xOCL6IKY; 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 S1343829AbhIXXki (ORCPT + 8 others); 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-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 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(-) -- 2.31.1 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;