From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59775248F71; Mon, 12 May 2025 17:30:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747071026; cv=none; b=ZNSRc4qidutYhhqwGMHftiTdXLALMUj+H/M17V7SeGSDDmjI+LOoow9arW/Of4O2J9OQBoMiSHb+FnuYS+biAu7R62lC+dWPdr2DFQmtuLPNLgTOLe/rLpsx6Idubby3fhY9NljggcWvuBXRmMgzuXTjOQwoW+z8bgwD4dACBsI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747071026; c=relaxed/simple; bh=O3Hs4GT+eAIAeiN4biT106Nk+1j1IQ6dO0dBpUuvjXY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QImzixsWEOdvtfkzOuFFW4KhIOE5d/qY5v0qALoZLm32Y7taoZmlzaJ01RFFXQJQ/gvnBbb1w3zPUGKLWYRT+MVPIlNB+FuXg9L3esmpajrHnn93Z1caIUTxB/+tL/xADmzLtndmDxx5vmk3v0GoSNNxecYIOqvwqjtBVJ+2YPQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DbL+4tJd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DbL+4tJd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EEF2C4CEE7; Mon, 12 May 2025 17:30:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747071025; bh=O3Hs4GT+eAIAeiN4biT106Nk+1j1IQ6dO0dBpUuvjXY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DbL+4tJdygXcMwwK44YrFewm2wSK1OqIkOcUoWDHLJu0/QQGDxNO4aXB/IYpPrtUI PHvO2ZzsAxxtOiBqPKtnQvqSdIe56VttT4MEq44oeq5RkChaHyhgcMa4GVXcePQlUZ SIOw7a8XwK2mDCOjIy5mziOXB6CObpcQwkdgO8io= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jonas Gorski , Florian Fainelli , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 12/54] net: dsa: b53: fix VLAN ID for untagged vlan on bridge leave Date: Mon, 12 May 2025 19:29:24 +0200 Message-ID: <20250512172016.145504579@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250512172015.643809034@linuxfoundation.org> References: <20250512172015.643809034@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jonas Gorski [ Upstream commit a1c1901c5cc881425cc45992ab6c5418174e9e5a ] The untagged default VLAN is added to the default vlan, which may be one, but we modify the VLAN 0 entry on bridge leave. Fix this to use the correct VLAN entry for the default pvid. Fixes: fea83353177a ("net: dsa: b53: Fix default VLAN ID") Signed-off-by: Jonas Gorski Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20250429201710.330937-6-jonas.gorski@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/dsa/b53/b53_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 29bf2fb5e532f..37b3a46b060f5 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -1926,7 +1926,7 @@ EXPORT_SYMBOL(b53_br_join); void b53_br_leave(struct dsa_switch *ds, int port, struct net_device *br) { struct b53_device *dev = ds->priv; - struct b53_vlan *vl = &dev->vlans[0]; + struct b53_vlan *vl; s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index; unsigned int i; u16 pvlan, reg, pvid; @@ -1952,6 +1952,7 @@ void b53_br_leave(struct dsa_switch *ds, int port, struct net_device *br) dev->ports[port].vlan_ctl_mask = pvlan; pvid = b53_default_pvid(dev); + vl = &dev->vlans[pvid]; /* Make this port join all VLANs without VLAN entries */ if (is58xx(dev)) { -- 2.39.5