🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #4130

Re: [PATCH net-next v6 6/9] net: dsa: realtek: rtl8365mb: use raw VID for PVID on family D

#4130
From: Linus Walleij
Date: Fri, 16 Oct 2026 20:08
35 lines
7872 bytes
On Fri, Oct 16, 2026 at 3:06 AM Mieczyslaw Nalewaj <namiltd@yahoo.com> wrote:

> Family D has no working VLAN member config (MC) table. Its PVID is a
> raw 12-bit VID in a per-port register at 0x0700 + port, whereas family C
> stores a 5-bit MC table index, two ports per register, at
> 0x0700 + (port >> 1).
>
> Running the family C code on family D therefore reads an MC table that
> does not exist, and writes an MC index into the VID register of port
> (port >> 1) instead of the one of the port being configured.
>
> Read the PVID straight from its register in
> rtl8365mb_vlan_port_get_pvid(), and make rtl8365mb_vlan_pvid_port_set()
> and rtl8365mb_vlan_pvid_port_clear() use direct-VID variants on family D
> that skip the MC table. They keep the family C frame filter handling and
> rollback on error.
>
> Also clear the family D PVID registers when the VLAN support is set up.
> Unlike on family C, where VLANMC index 0 is the neutral PVID, the
> register holds a raw VID, and after a reset it keeps its hardware (or
> EEPROM) default. Without clearing it an unconfigured port could report
> a stale PVID from rtl8365mb_vlan_port_get_pvid(), and
> rtl8365mb_port_vlan_filtering() would accept untagged frames into it.
>
> No functional change for family C.
>
> Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>

Why did they remove that ... weird but it is as it is.
Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij
Technical Details
Message-ID: <CAD++jL=q1OccsOoeDA+EuRqvngu-jUK60P3xQ-Rt_wKYz+ZO7g@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347529-linux-kernel-netdev=dewy.ru
References: <5a4715dd-89e0-4868-9ffb-c8fb73b18d04@yahoo.com> <4a8fe6f9-bf6f-48b4-b4ce-d9a1d773dafe@yahoo.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347529-linux-kernel-netdev=dewy.ru
From: linusw@kernel.org (Linus Walleij)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v6 6/9] net: dsa: realtek: rtl8365mb: use raw VID
 for PVID on family D
Date: Fri, 16 Oct 2026 22:08:34 +0200
Organization: Usenet Network
Message-ID: <CAD++jL=q1OccsOoeDA+EuRqvngu-jUK60P3xQ-Rt_wKYz+ZO7g@mail.gmail.com>
References: <5a4715dd-89e0-4868-9ffb-c8fb73b18d04@yahoo.com> <4a8fe6f9-bf6f-48b4-b4ce-d9a1d773dafe@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="2864673"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:N4/92SJnQwZ0bHN20e1EAb8HJCs= sha256:VVzRupfO4xFyB0FiVjPhcVBwEpFTfSBNDjbzqVDyTt0=
	sha1:2SCgadpGlaa0WF3BalbSHkG+FCs= sha256:mfjef+rUQb+km6VOEsCOfJ9pZNyL9f/NYBWArdQeTMo=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id B3FC71105EB; Fri, 16 Oct 2026 23:09:39 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.64
X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id WVVHebF_QWmk;
	Fri, 16 Oct 2026 23:09:37 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-347529-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id BF38B1105E9; Fri, 16 Oct 2026 23:09:27 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id 6F5B2349C8; Fri, 16 Oct 2026 20:08:50 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 368413CB2FA;
	Fri, 16 Oct 2026 20:08:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="md17tXlz"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
	(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 3155B3BA25E
	for <netdev@vger.kernel.org>; Fri, 16 Oct 2026 20:08:48 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792181330; cv=none; b=iHA7L5+CnvFyvFtJ0FiTwGPKWOhEOvM9QlJ6ZHe8ixBcwidmIfC+8L6L6dtcu96SCdhuXRbjgN/8vgGZBRT8+M8/CeOjthkqLvucgSpG4gq/D2xYdlsZfkT3t5tM/hLDfXid0XtHdRCRsLqT3llmoBScygiIXGloRCP98qm0GlI=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792181330; c=relaxed/simple;
	bh=XUZGkG6NcUKSpmL3skQqQZZtcxMF/YmZw1d/4452TwM=;
	h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
	 To:Cc:Content-Type; b=BE7BVYh8u6Ei7wEcgTgNw0vNMMI0kx3IPcJll9wcSSRCQhWnIYjCIZ3c8a05M+QeaTciX7L42z+SpR3F0Pym14cHE8zCes/dfMCIYbPfeN6DxF9q3XGeFqnE5695+xPaBVvmnbr6F6+16vAyrIeGAHvDldu/7GIzK2TULKi/qOA=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=md17tXlz; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D41B71F000C5
	for <netdev@vger.kernel.org>; Fri, 16 Oct 2026 20:08:48 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792181328;
	bh=XUZGkG6NcUKSpmL3skQqQZZtcxMF/YmZw1d/4452TwM=;
	h=References:In-Reply-To:From:Date:Subject:To:Cc;
	b=md17tXlzW/uRteXNDIdMFITdQfI+e12Ozf4x16h54vmwLPP2N2NFuxvAFz9qyPgQb
	 e+b+55StGdHmROJbODpMR6TJrdDzlXM1qWA3o0IjuTOBrvYoNzb9Htb0igs6Fw6gvB
	 SPOE19Fa0fAr+xaUyvx8c2O0tDGoeo4+EXjsAsb4QDAQOAdRWyxNDqY10+j87NV9VG
	 mzuZpFOYR0vgxENhh1wy6WCECYsmtrqGoP/+gMUgb4UmqiorIWMOhMwYtoR9hhV3cw
	 w3mNxz6UWtmn8kg+0BQNticspaCq/48RQtC8qxffBBX7GZ1DmuxWTpRcIScWbCia0j
	 4e9k1igCjnFXQ==
X-Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-5ba36cc21cdso302929e87.1
        for <netdev@vger.kernel.org>; Fri, 16 Oct 2026 13:08:48 -0700 (PDT)
X-Forwarded-Encrypted: i=1; AKwUvBxSzY9dP7NHDKFb8nMEtxUrhkyDlXQeQkQ7bbHL18DqmSgPI4LUVWI+MEPrVCytHx1dVrV42T4=@vger.kernel.org
X-Gm-Message-State: AFq9FYL7gt3CS63qFmeU+YoaDbhrZezgjb8flDsxMlXtFnqKhNdnA1n6
	ZDKS7gDFfOEyCBjMMYTJzpis4ws01MJQ4XyKxKtuPGOAJjbAI/QwJ5HlpprfpHxHOCIC7OrwNqP
	ognXh5zcSGj9HFk9E3KA1t0O2oUGLqf4=
X-Received: by 2002:a05:6512:65c9:10b0:5be:50f5:9514 with SMTP id
 2adb3069b0e04-5be50f59560mr52120e87.9.1792181327687; Fri, 16 Oct 2026
 13:08:47 -0700 (PDT)
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <4a8fe6f9-bf6f-48b4-b4ce-d9a1d773dafe@yahoo.com>
X-Gmail-Original-Message-ID: <CAD++jL=q1OccsOoeDA+EuRqvngu-jUK60P3xQ-Rt_wKYz+ZO7g@mail.gmail.com>
X-Gm-Features: AclHuK-GY6A_rqsDCrnCUEbovna_932PAL0ABBL6EpyGpHuDVFvgc73ZJ19jwVc
X-Cc: andrew@lunn.ch, olteanv@gmail.com, kuba@kernel.org, davem@davemloft.net, 
	edumazet@google.com, pabeni@redhat.com, linux@armlinux.org.uk, 
	luizluca@gmail.com, maxime.chevallier@bootlin.com, netdev@vger.kernel.org, 
	linux-kernel@vger.kernel.org