Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3419508pxf; Mon, 29 Mar 2021 01:30:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVKNm3SeYM/750hVq5gSat4qGn37DRc9B00Th5jhdKE5kDZAksiqiwEzpcDzQPGZ5Roukh X-Received: by 2002:a17:906:b318:: with SMTP id n24mr26790144ejz.372.1617006643994; Mon, 29 Mar 2021 01:30:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617006643; cv=none; d=google.com; s=arc-20160816; b=IurtFBqdz6MbvqeJU37mpm+5zxzEzWUg80WEzfNjV3A16W7+xw6jeF5KShOUAHxF6o znqrWJ+B+3HhAwfDbQo9pzCUyy7pLnFGFPNYYMzvU/XwehvuVJGSS698G+ZXk7M1MI7Q jpIvGnIociQ+5N2R9UxrwNnYIx2JBMd1W4mlDySwAIhAlyT5IMqxeXftmhNDHHWCM2o0 OLhsfQdhFv4DjH5qKbu6eGkNP8tnDOqxuTitQ3Yzwozj9drVlKv2xzhWMsnLBKVBQ5ve O05q6pZtGbPL0e0RprFWQfrr+GdZzgMN/OoNiulcWI9W3LYL99dFW6US/MEoQP/xXNEL nhNg== 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=ZixVrwVUI/+3spfDQYnE5xLT1b3W5b5gaBj9YOLNDqc=; b=ZwvuRjAXURQ8hxnCiZQosUAJHwFOKdr9GWb/pxeJnvv7XinCxZQ31VHLIebuj29ykN LMbGLrKLk+FGZhlhf/KfpltUg9MoucheGonxG4x1dHEp6QxZWdR1BscGQIQYDVBCB5vy mHQIXmR+/bOZCKcUcgp97XyxQGmIy5mODYYXY26m7pzopgnc9fRbg8QfzvXQUBrd/BIC lDog+oLM3+OhMU/z6tT54QJ/DWC5JEoqIR2iPl+i+DG5K7Um03MBx21b5/UyORWrFfW/ eqXt9k7JTBsnpz0t6OlDdjrsXXqZau996GV6oWCHdzo5B/ySLDDsvrMJVnsLfWCU5mep qGpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Qn2okhE8; 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 x14si11706392edr.255.2021.03.29.01.30.21; Mon, 29 Mar 2021 01:30:43 -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=Qn2okhE8; 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 S232756AbhC2IZ7 (ORCPT + 99 others); Mon, 29 Mar 2021 04:25:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:57912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232801AbhC2IRC (ORCPT ); Mon, 29 Mar 2021 04:17:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 832CF619BC; Mon, 29 Mar 2021 08:16:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617005794; bh=qFgOR6HGolDvToX13sAR7yijc3lNwG0DEM7nF7p5t58=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qn2okhE8rPVDaVUxfWEk+5pFaum5PpZPCGc6rezRxTt6sxAiIyTcboUjArbiuxTW2 s3Yofft/Cc/8ulDPVnFdkG7z5QknTBlSalE+0kDSuL8zN28JHL5KSaF/OSHwdMnm38 fdn5v4E8zi+FMEMqbE5p9oK7ibY/7gt3InkVfqu0= 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.4 107/111] net: dsa: b53: VLAN filtering is global to all users Date: Mon, 29 Mar 2021 09:58:55 +0200 Message-Id: <20210329075618.766865302@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075615.186199980@linuxfoundation.org> References: <20210329075615.186199980@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 @@ -996,13 +996,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 ret; } @@ -2418,6 +2411,13 @@ struct b53_device *b53_switch_alloc(stru dev->priv = priv; dev->ops = ops; ds->ops = &b53_switch_ops; + /* 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);