From patchwork Sat Sep 25 13:23:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 514625 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp2424692jao; Sat, 25 Sep 2021 06:25:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvzd5VqrVqvN4/i4cRKS4MtmBCMny6a4L6BsAsLFQ0MaRNknyaKvOUhmrjhRbJPcy4BqGM X-Received: by 2002:aa7:c1c6:: with SMTP id d6mr11375722edp.117.1632576340647; Sat, 25 Sep 2021 06:25:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632576340; cv=none; d=google.com; s=arc-20160816; b=CbI22B+4Kop9m8i2EzWPGBcfZo5+TheJpS5ucfIoPT2el/8Am6bRPIBjdbTGYQjUfr B2cSiAtWZEAG8HnS+0TUo+aC4XOIds3Seft8gmFN732NzNd7ASRWUI5Ybx/J8xNMFIyq 7TEOB4EpPTNVDY/q2vJ/F0rkHdreryKOXEwt7zY0Kk0Lc7N324EZuAYhuEnw7Pr6Q2p7 1XhBmGsMFwlSXOKw2+wPq5mbjEvIPI6WCE843YxegxRZqsKMVJjkQgEkMne4Tw108cZ9 3c9zBj7sPcb7fuIncFvHTKWWcr8UdW3FoyPNh6fYoE8H9blfnPW/CHaXswGjynn+N7MG j0kA== 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=l58tRXqzKdB7MAdnaHT3OcMQZTQEtALQkUgXblUNQ0M=; b=YfxoZU8t2oK1oJByFsVDmXvk1CxGICe8QdBZ/jKSsC5HrfDEdep0M6l5oUg3TQjEPo l55nRSMbdt1GMJBw7ze0tjZnj2SU4IzPClfDPEgJdC6EpsoJW2kqfD2yqZyY3v9srGQG qskqwHNi4P8/nxwOpg0hSKAoGMy2193I2b8XI6XQ/AMRS9xrqkO1gVlVZxeKBeqw+EoO LbGxnMXe7W0qCE2MKqEu/reDmFnAJ6DnKQNU3xHnRAlWsvfBEUeq20382qh2dUbGa2hm UWh8omhGizq3yJoSdnH6oK8+/qrWEhWCRU3nuuDd906VkyY45L2N8sAr2mSyzQNL66B9 c7pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dciIA8Oi; 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 y17si11435416edm.70.2021.09.25.06.25.40; Sat, 25 Sep 2021 06:25:40 -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=dciIA8Oi; 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 S245622AbhIYN1O (ORCPT + 8 others); Sat, 25 Sep 2021 09:27:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245591AbhIYN1M (ORCPT ); Sat, 25 Sep 2021 09:27:12 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC2EAC061570 for ; Sat, 25 Sep 2021 06:25:37 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id u8so52108769lff.9 for ; Sat, 25 Sep 2021 06:25:37 -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=l58tRXqzKdB7MAdnaHT3OcMQZTQEtALQkUgXblUNQ0M=; b=dciIA8OiaRzRMYpy8Xo6wDLagonesv4wTKocpCMMaorSVqT4IVh0JbTtVJwRk9XEXx p/ARgE295C1MAOSqRfNaQqjNYnEKo7djgSyDMv7LHqV+FeFdvieoS4uD6kzJ89qpbV0f +3FCS+qe02rymYRClR1JwQdvf1+V0DxA0kHDSb4JE38+Yiz6/9tuP68lNbAeymjmUhfU y3cZXPoHzU5T2OV+dnTidkpWCkb5V+l5ZPSaZrRf2Gn+KoliIHF6+2sL4uwv3eVuVkGP BPPPj6Xipv5FfTbpg3Yn8n5aFwKPkQ7EXyco6rBQ5d4LuYEUy1bHgCn+/IjkJ7XDM2Rs CLEQ== 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=l58tRXqzKdB7MAdnaHT3OcMQZTQEtALQkUgXblUNQ0M=; b=n+Dc1WIfJ/rT0PFosNtwdEqhEwOKvk4+zKpMRy9u4Rm2Yn0b3QAuxrNwWbaoY7EfDu Ii3xq+OvMFlPMKSGA6jiDfOjIhXCD0hiun6a9sAJv3uGH/TuBit/yPeBcg2OnpNvcpgc 05JYSmY3BNJiMtpqiAvn7spIidPubrM5by9F50BvEPU6GRMk27iDNUxJSUQVBLUicYph 8XQvtGv/Owtg55yBZTzGWq/VEV1rxcBCbu1XjCKXoeLb2yO38TQrN5vFF57/MzrQfW1Y MVNGAbAOfl1aS2E5cg0zvXOlbDX/upuC0YD+hzw7SvzvrNjivrpSpXcxSPIKv9ZTtME8 juHA== X-Gm-Message-State: AOAM530ZJ/tq+jsPNbgPSeDJegVOLg+EMHKxmCIOlh1DzGdWQ9Z+Y4Kg TsCjJbyDpX/uHh12rYFjS0KWXw== X-Received: by 2002:a2e:aa8b:: with SMTP id bj11mr17412295ljb.180.1632576336065; Sat, 25 Sep 2021 06:25:36 -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 y25sm199590ljj.23.2021.09.25.06.25.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Sep 2021 06:25:35 -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 v6] net: dsa: rtl8366: Fix a bug in deleting VLANs Date: Sat, 25 Sep 2021 15:23:10 +0200 Message-Id: <20210925132311.2040272-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210925132311.2040272-1-linus.walleij@linaro.org> References: <20210925132311.2040272-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 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(-) -- 2.31.1 Reviewed-by: Alvin Šipraga Reviewed-by: Vladimir Oltean 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;