Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3493478pxf; Mon, 29 Mar 2021 03:57:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc3eNsjNupA4BMzMjOKOqlOIBJ3A2QbSAOWRYpa+t1YI26LV3J4v2Hq20ByN+DxXeyUrSl X-Received: by 2002:a17:906:ef2:: with SMTP id x18mr28539390eji.323.1617015432874; Mon, 29 Mar 2021 03:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617015432; cv=none; d=google.com; s=arc-20160816; b=F6yOfXqLQKEW59YEn6HxyKhbMDMNb2DXs+XTFcfkIkfxR9LdC8VJPF7IT3PvAan6Qi NEj+wUE9hK9hpaStds8iLxs2Ws/GsKBPLzBDyStMo6a9FbRBMu4J0LJr+dSOvRX/iP5D 1dMN6upN/kw7y1CS1wPMt7XTmumy4uEKkvGXRRA1jMOeYqV6nKkbfOGNwa+lPR2ktVrp MG+mhQdBYaD+TFN5qsSLfJfmBtC+80BDWKtc1pVRAW3yhNELjDOdaGMGwfpe3lMzJDtk XlALGWGyJdirg9FS2pK/ueBnz2OTCA+C9dPsKXKpJw5gkw0zcSJ4+i64uvJs8Te5ElGv ircg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Z2vk7xeFgL7zfeCEQKlZD4+y13UD6UvMs9BmqX5RcB8=; b=AD24R5VxvUHVvOvysYVo6E6EURzra2yoxaID7pVUmzkdhJIOKHCsnS1Xt3szsJEqWT qSjdbGqmNh4z0/t7hSCFeBUgnkNdAtsGzrshKYDqYdPHE+VZ2DXyEjrlBbc2ld+0i3gc tGMIBvOEpWrRMzYTMF0u5suW12baurE1lI8rHQSOym1TguPrOllUV6nevBP9O6gSrlaL HBm8KBgLocwsVRLNJ+sL6X9+/FiQpo2r3czSUySEBC95GFkopoRnEcywiei/dBGfGfvf z7BBOvj0pYSYvSs2jrrRkKgjJR41JFO9WcL3SM75HfRS5yVjNFvCH/n444kG98OHkSIS T18g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cuhLDnbb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si14387792edn.523.2021.03.29.03.56.51; Mon, 29 Mar 2021 03:57:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@linuxfoundation.org header.s=korg header.b=cuhLDnbb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235027AbhC2Ipb (ORCPT + 99 others); Mon, 29 Mar 2021 04:45:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:41252 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234083AbhC2I1p (ORCPT ); Mon, 29 Mar 2021 04:27:45 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B624619C6; Mon, 29 Mar 2021 08:26:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006405; bh=rMdPAZO0VdX/sO2a6HJ7gbb6NlO6N3a3OAI+2gyIEEc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cuhLDnbbxvkn3raRhs+3jBEdR6YpdCspgnBdDxCqPmAGqW4mQ/F5SkRxhL6ykai8v HptQOod+MiUZsMatFoyXewmnen8CvLDaQpm1QWAlzf96bJVz/zNVKnhxYgpHS2Orop AuuHMWawe1+yizoWhuuPsqYp6t3RtLXwiFig+F+A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Florian Fainelli , "David S. Miller" Subject: [PATCH 5.10 214/221] net: dsa: b53: VLAN filtering is global to all users Date: Mon, 29 Mar 2021 09:59:05 +0200 Message-Id: <20210329075636.270770542@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Florian Fainelli commit d45c36bafb94e72fdb6dee437279b61b6d97e706 upstream. The bcm_sf2 driver uses the b53 driver as a library but does not make usre of the b53_setup() function, this made it fail to inherit the vlan_filtering_is_global attribute. Fix this by moving the assignment to b53_switch_alloc() which is used by bcm_sf2. Fixes: 7228b23e68f7 ("net: dsa: b53: Let DSA handle mismatched VLAN filtering settings") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/b53/b53_common.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -1070,13 +1070,6 @@ static int b53_setup(struct dsa_switch * b53_disable_port(ds, port); } - /* Let DSA handle the case were multiple bridges span the same switch - * device and different VLAN awareness settings are requested, which - * would be breaking filtering semantics for any of the other bridge - * devices. (not hardware supported) - */ - ds->vlan_filtering_is_global = true; - return b53_setup_devlink_resources(ds); } @@ -2627,6 +2620,13 @@ struct b53_device *b53_switch_alloc(stru ds->configure_vlan_while_not_filtering = true; ds->untag_bridge_pvid = true; dev->vlan_enabled = ds->configure_vlan_while_not_filtering; + /* Let DSA handle the case were multiple bridges span the same switch + * device and different VLAN awareness settings are requested, which + * would be breaking filtering semantics for any of the other bridge + * devices. (not hardware supported) + */ + ds->vlan_filtering_is_global = true; + mutex_init(&dev->reg_mutex); mutex_init(&dev->stats_mutex);