🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #10084

Re: [PATCH net] net: pcs: xpcs-rk: limit advertised interfaces

#10084
From: Coia Prant
Date: Tue, 03 Nov 2026 06:11
61 lines
14132 bytes
On November 3, 2026 10:54:57 AM GMT+08:00, Andrew Lunn <andrew@lunn.ch> wrote:
>> Hi Maxime,
>> 
>> You're right that for modes the PCS does implement, the limit belongs
>> on the MAC side. The complication is that the compat table describes
>> the whole Synopsys IP set, while a given XPCS instance only implements
>> a subset of it. That is a historical design issue in pcs-xpcs: the
>> table mixes C73, C37, 2500BASE-X and 10GBASE-X entries, but different
>> integrations implement different subsets.
>> 
>> On RK3568 the XPCS instance is wired up for the C37 SGMII path only.
>> 1000BASE-X is part of the same C37 core, but I don't have a PHY to test
>> it against. QSGMII is not implemented in this core. 2500BASE-X and
>> 10GBASE-X are separate modes the shared table carries, and neither is
>> implemented on this SoC. C73 is not wired up either.
>> 
>> Trimming the mask is not limiting the PCS, it is cutting the shared
>> table down to what this instance actually implements. A
>> platform-specific glue is the right place to do that.
>
>Are there any registers which describe how the PCS was configured at
>syntheses time?
>
>	Andrew

Hi Andrew,

Yes, looking at the `xpcs_identity` code, the core does probe different
MMDs to get the rough type: PMA/PMD MMD for C73 and VEND2 MMD for C37.

However, even if we determine it's a C37 or C73 block, that only gives
us the rough family, not the exact feature set. For example, a VEND2
(C37) block might not implement 2500BASE-X, and a PMA/PMD (C73) block
might not implement 10GBASE-R. The MMD ID itself doesn't tell us which
of these sub-modes were actually synthesized and wired out.

Since I only have the Rockchip RK3568 PCS documentation, I don't want
to blindly touch the global compat[] table in the core, as it could
easily break other platforms (Intel, NXP, etc.).

That's why intersecting the platform mask with the core mask in the
Rockchip glue is the safest approach for now.

As a bit of context on where this is heading: currently, the PMA layers
for wx, fbnic, and nxp are separate source files but are compiled into
the generic core module, relying on a shared compat table. In a
follow-up net-next series, I plan to split them into actual independent
modules using an abstraction layer and their own xpcs_xxx_create()
functions.

This will allow other platforms (including Rockchip) to do the same
mask intersection and PMA-specific setup without bloating the generic
core with more and more platform quirks. Right now, dwmac-intel seems
to be the only platform that completely relies on the generic core
without a specific PMA module. So keeping the core generic and doing the
narrowing in the glue is a safe, self-contained step that aligns with
that future direction.

Coia
Technical Details
Message-ID: <27E466B0-72FD-47BA-B952-68BF4A817A04@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-355239-linux-kernel-netdev=dewy.ru
References: <20261029094916.3127193-2-coiaprant@gmail.com> <c5fc86f9-3c43-4aee-8d88-92e8f88c6d5d@bootlin.com> <1B8D463D-1295-4BF0-972D-859C342E49F5@gmail.com> <48cb8a9d-622f-497c-a13e-bc679c764ce0@lunn.ch>

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-355239-linux-kernel-netdev=dewy.ru
From: coiaprant@gmail.com (Coia Prant)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: pcs: xpcs-rk: limit advertised interfaces
Date: Tue, 03 Nov 2026 14:11:59 +0800
Organization: Usenet Network
Message-ID: <27E466B0-72FD-47BA-B952-68BF4A817A04@gmail.com>
References: <20261029094916.3127193-2-coiaprant@gmail.com> <c5fc86f9-3c43-4aee-8d88-92e8f88c6d5d@bootlin.com> <1B8D463D-1295-4BF0-972D-859C342E49F5@gmail.com> <48cb8a9d-622f-497c-a13e-bc679c764ce0@lunn.ch>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="3106726"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:wfxWHOhJ8Ps4Hwqg0mdWvw7cToo= sha256:Yrwxm+7gZ1lsF6alzmvNZ7oyK8q+b7B8hjDVle3fheE=
	sha1:MzhwoUvtRrjU9L/rVoAhl1PiwwI= sha256:XT2lxBScLRtCghoK4emAWwP4k31BGXXgpfj55eB5u6c=
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 8CEC5112749; Tue,  3 Nov 2026 09:14:40 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	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=gmail.com
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 ylT2zkH_xpof;
	Tue,  3 Nov 2026 09:14:34 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-355239-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id B06BE112739; Tue,  3 Nov 2026 09:14:24 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 091082ECE1; Tue,  3 Nov 2026 06:12:08 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793686327;
	b=Qo17xyvQOVdRP9ygVZBOKfGbCdpMAWVqGMYLoCP99ZfIevSvggadLlrMF3BExpZHEsk5
	 HjliBw+fNsmfyUS5gZwM4mc0xz3HPRE08fVZk4Zl3xFFt9RvgUsN3xtZssI4RUajAFDXG
	 J0obU3h8szcz37xFWsG1UANMltq2FBwp/Zte2xC0uMgZqTxHheU3Z/MBUlnjO4CAdZ/KR
	 zh4kW4+8/VoCCPZCuXDDf8rVoLthTp/QH/9epVg1sxvSvyfXcFo0fr4hp6snAOM9rlw2e
	 AaRHG6j0hg0lW2d+afXJ9R6UsksrBSvucPLtKijkgTbttcrtCH4y8BbdRmQ5tUZ8CXw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793686327;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
	 X-Gm-Gg:X-Received:Received:Date:From:To:CC:Subject:User-Agent:
	 In-Reply-To:References:Message-ID:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=kbCkmRLiacqgEr0yA1tZg4DGh3TnytEQLj8xoSVFM2w=;
	b=E7X85jJmTqENLBwQ8wZ9Dj7V7Yv4U7RbIm/5v+p9LC99doHYf+UBFSywiHnZy/Nwxa4a
	 gQAtucQULwiqoOZs0LzHtUjaq/uDqdp8AceHMHY82zbLOnoNUBcToXUYnM4Cb+Z4NZOUF
	 yJD1e+1AIOIW2/md6kNdsPERKOh1K+bpuB/xe72+2BB5z8sdgohEhMCoxKkIPDoHkG/A2
	 +ZTyMYbJk9v78qaQaHGY5JVayEAOkGK9kFyc+Z/SWtKRtB+HYptYmVRN1M+IodyEMWmOg
	 OC2pPyfiv+S4n25Quamr/BjjBv7bOn/cm2gK/3wunDb5A2znLvaMkJxv6QpKm9bciJg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hF0OI93F;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id EF416606A33C;
	Tue,  3 Nov 2026 06:12:06 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hF0OI93F
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.227.138
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793686326;
	b=NcNaLIyzHrjuBkQgcw8slD4Klsn8Vb+GiIAE0uZH6QBejjrlglzM7BgPJRa9aqZGGlr0
	 ZusD4BBUuT80pFXs97PML9Tx4iU5IqWLRaJLy1l5pEIFan3B1qvvO/iXYoCpSnKGxdHu5
	 HzoG+7XCzNsamMMgo1ZMkHmZMfNd32IFabeE4TNLoJFb9eHHvVxG93gE/meWKU5tdO9O1
	 PXa0s4R7r1+Fd9hXddImypOH7mD7Chamr4vKgMLuD/qHAThDTvf4yZL6+COyZapRRs/zE
	 x9DtvPutR96+NJGRbFit/1PmpEERk//nAsrTCAkZdq/aKt7xOOgtAR1PLb7u4gIehIQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793686326;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
	 Date:From:To:CC:Subject:User-Agent:In-Reply-To:References:Message-ID:
	 MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=kbCkmRLiacqgEr0yA1tZg4DGh3TnytEQLj8xoSVFM2w=;
	b=yx7po+i994+KBOT7sdE5QDcXD2Q2oMYHaT4w5Wdr49AZK50wwDlliVpuBYl7Cv9oDhP1
	 F5jE6hlGuzDnKyfM3I/fAQsWdfzD8Ru3QeSZ1aG5ZOAdUctr1HB4OoptWojRtgY3zafw0
	 xIyRv5GZUCaHV2UGvRyENfCmWhKRrwd7GpYsEcFeqrjlcKrNgZ4OpEyzkM4LXy4q2XXc/
	 +QmBUjlxe5+dfZ8trJsjgEBOEdE3O247LDpbdP/I1g2I0BqsOth63UnhPANdyHZriaY0h
	 80ZewEsnts8Q3DYyMBHCBle6dXQavUKw8FfADsGFlMbrQmyMcYRm0vMi3hNL1Z91Y5A==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hF0OI93F;
	arc=none smtp.remote-ip=74.125.227.138
X-Received: from mail-pj2-f10.google.com (mail-pj2-f10.google.com [74.125.227.138])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4AEE606A32F
	for <netdev@vger.kernel.org>; Tue,  3 Nov 2026 06:12:05 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C4AEE606A32F
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-pj2-f10.google.com with SMTP id d9443c01a7336-2e934c6c20aso26160225ad.0
        for <netdev@vger.kernel.org>; Mon, 02 Nov 2026 22:12:05 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793686325; x=1794291125; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:mime-version:message-id
         :references:in-reply-to:user-agent:subject:cc:to:from:date:from:to
         :cc:subject:date:message-id:reply-to:content-type;
        bh=kbCkmRLiacqgEr0yA1tZg4DGh3TnytEQLj8xoSVFM2w=;
        b=hF0OI93FiqBYtkocRs2fbIqooTWb6yxS957o/05+Lc5RPe1DPTDXUbEBcYTD6WZgWG
         6XU69K5ngM5w7gMeTLaAhHYLnXlYfIH47JT1CK4ncXteHj+khNbSGytL9jgJaGmcMyRs
         yia5d8Gb5vurBZERoPR8xlio1THtuGt1ZYRAgahAK+hqhBetUFydMPi0QDFZDQxC8Rnr
         jVaI/hytvXutk6z6P4z151g2bgE61eymsPsGij2oovpg6h9tkfQ6B0bBAoGE6qoM1Y5+
         PoEE8Gxjf+/7wpsVLa6g55MNxsvpXx/wU1nqn3eExd5tVYB+XQJ/d69JYfL6YpFnsPeZ
         Ot8Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793686325; x=1794291125;
        h=content-transfer-encoding:content-type:mime-version:message-id
         :references:in-reply-to:user-agent:subject:cc:to:from:date:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=kbCkmRLiacqgEr0yA1tZg4DGh3TnytEQLj8xoSVFM2w=;
        b=G/PuofSMxRntmiSXW/3Qz09Ywyt6CUq8gNz6Mih/PuCyv2x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F7dOGHKEu7z/MsN1WtxUvSyB
	P4Umh2mcoE87Zibk4RW0myktr4Ll9K8LldhwBHDf5fkc8LZRaheVB5knlbQ59GfvQbBtLwzU8ln
	DK6xdz+Z81WP174FdXxzx48Wfa6I3TKtgvqPJww=
X-Received: by 2002:a17:90b:534b:b0:3ab:4f1:4f76 with SMTP id 98e67ed59e1d1-3ae898127f4mr10100410a91.24.1793686325004;
        Mon, 02 Nov 2026 22:12:05 -0800 (PST)
X-Received: from ehlo.thunderbird.net ([168.138.199.194])
        by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b07c627260sm2564063a91.8.2026.11.02.22.12.03
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Mon, 02 Nov 2026 22:12:04 -0800 (PST)
X-CC: Maxime Chevallier <maxime.chevallier@bootlin.com>,
 Jakub Kicinski <kuba@kernel.org>, Heiner Kallweit <hkallweit1@gmail.com>,
 Russell King <linux@armlinux.org.uk>,
 "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>,
 Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org,
 linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
X-User-Agent: K-9 Mail for Android
X-In-Reply-To: <48cb8a9d-622f-497c-a13e-bc679c764ce0@lunn.ch>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list