🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #9020

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

#9020
From: Coia Prant
Date: Fri, 30 Oct 2026 21:08
75 lines
14142 bytes
On October 31, 2026 4:44:22 AM GMT+08:00, Maxime Chevallier <maxime.chevallier@bootlin.com> wrote:
>Hi Coia,
>
>On 10/29/26 10:49, Coia Prant wrote:
>> The RK3568 XPCS supports 1000BASE-X, SGMII and QSGMII, but the RK3568
>> GMAC only implements SGMII, so only SGMII is advertised in
>> supported_interfaces.
>> 
>> The generic xpcs core fills the mask from the compat table, which
>> includes 1000BASE-X, QSGMII and the higher-speed modes. Clearing it and
>> setting only SGMII keeps phylink from validating interfaces that are
>> not usable here.
>> 
>> 1000BASE-X and QSGMII can be enabled later when a board actually wires
>> them up.
>
>So the PCS supports them, but not the MAC ? The correct fix for that is
>likely in the MAC then.
>
>There's nothing board-specific when it comes to supporting 1000BaseX if you
>already support SGMII, 2500BaseX may work (it's 1000BaseX but 2.5x faster).
>
>Ii may just be that these modes aren't implemented in the MAC, so we should
>keep them enabled at the PCS level.
>
>Maxime
>

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.

For 2500BASE-X there is also a physical conflict: it runs at 3.125
Gbps on the SerDes while SGMII runs at 1.25 Gbps, so the same lane
cannot do both.

So the mask does two things: it trims the entries this instance does
not implement, and it leaves out 1000BASE-X because it is untested
today. If you'd prefer I keep 1000BASE-X in the mask and only trim the
unimplemented entries, I can do that.

The xpcs_find_compat() part is the more general fix: it makes the mask
authoritative so the core does not configure an interface the glue has
marked unsupported.

I agree the stmmac OR-merge is the architectural issue, but I'd rather
not mix that into this fix. The compat table mixing is a separate
discussion too, but I'm happy to follow up on it if you think it is
worth pursuing.

This reply is to the v1 thread; v2 with the folded xpcs_find_compat()
change is already on the list, please have a look there.

Coia
Technical Details
Message-ID: <1B8D463D-1295-4BF0-972D-859C342E49F5@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-353931-linux-kernel-netdev=dewy.ru
References: <20261029094916.3127193-2-coiaprant@gmail.com> <c5fc86f9-3c43-4aee-8d88-92e8f88c6d5d@bootlin.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-353931-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: Sat, 31 Oct 2026 05:08:50 +0800
Organization: Usenet Network
Message-ID: <1B8D463D-1295-4BF0-972D-859C342E49F5@gmail.com>
References: <20261029094916.3127193-2-coiaprant@gmail.com> <c5fc86f9-3c43-4aee-8d88-92e8f88c6d5d@bootlin.com>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="2315711"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Zlfe+jJhWax/XY8i9vvcpfBvUTM= sha256:ZELckUEfNk8aVx3y1gduCIhac5cYH91GeT4bWGqp8X4=
	sha1:gT/SwlPJKUKUHJQm6sj8KuFv+oo= sha256:hPfUl4NU8kRBVf/Z0HRjCCCpfIcLVmRKI0uY9kWaxt0=
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 0B19B125CA5; Sat, 31 Oct 2026 00:15:00 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 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.25,
	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 qewFpoAItAln;
	Sat, 31 Oct 2026 00:14:57 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-353931-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 130FA125BBF; Sat, 31 Oct 2026 00:14:48 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 2B53029E51; Fri, 30 Oct 2026 21:09:02 +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=1793394540;
	b=BMPCkV/GIG/g6+QsFSxMgv3ULdwlj28mXRnbFhgpdN8th78H8YHHVVjZQ9TK1/UEMTQU
	 56c+RB1BijGwWsHnYNYNw3tr6t/tvtWOV0HXL3wSR1ovPuufHXXxXFBmlcaSRlR3DngZi
	 QjnlhaAnBdcVh0bWm5Qt5NyQrVJhL75OSDafyVPppM1hYLfW10RDpPMjgvcFGjzFJPgBb
	 DhgLehbcV+jNHXQz0h89TuRlXAmqO55AZBL3rouDe5Yqh5q52uIe6DkeSb8GP8+heALLB
	 J7IJVNP2Dbgh1UR3M7IHdSYKhshmcSeKeqVJxwMrkJmBNnj2gCex+WpALF/06dviaUg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793394540;
	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=W3z0mwrPXjDyh25V3etJIycxf0MnLGdgmbdL34z00rw=;
	b=CYST4UcebEjpTt4sIyoUe6JQLA85dr5qqpPGpEPt2PyR2uoYNuUwgp58kQS73+EnTlwt
	 Cd1+GWZyG9DEc6To+wyha1d7Hl+lqIfTjKWe0OSlJL0ympsk0XNJPqPPUnl8BuWXM4XJ4
	 aXrG+ZZMEjVkxEWCLYetzIAqlItWv8SX7PvlN6QY6c9un/WkvNzj31CFBH2/FtpfhUMBB
	 +HFBEDY0j9zggo9Bt8njnX1Ygl3f2EsSkrU71vi0c7DEGGj0/RdGGEy9ChqnIr6jebL7+
	 Wf/EJ9XAquEzTio7secc/O49fRVsHzmlRTY3++FRuLxE8r/BPrLIMaPs9aTCvTkV6iQ==
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=ARvR3frD;
	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 370B6606A329;
	Fri, 30 Oct 2026 21:09:00 +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=ARvR3frD
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.229.6
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793394539;
	b=rUTvx4Txj/qJoGr8aZvitdFZ+UJAjI6pMhT2y9R0ufgLI5c5OlNT6xH0v0EeeNYrB3Au
	 zcZg6qq83jdsfnYcVTU0rqNJ93WlYSQe2d58Q7WlhcSc77CUZoMAjZSGJvKhGDf4qSflb
	 d3S4zqw3WcXNOqVUXBAOQLyj3iTaiLRuQvTqZRu6tJi0E/dkmyDR6LM1eUzArxkSerWki
	 Zo7eYCzVGQPliwOkBSZ3m9R/i+f6Lf0LRTFGmgcmuIPrc6Zs+U2uwRetFCviUIJx/BVu5
	 v++f9VeuGNQsKF1nfJRBVd+WDLr7mE3QN9bfte72SK8Jd944QMcXMeZM4ZaJFG8x3wQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793394539;
	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=W3z0mwrPXjDyh25V3etJIycxf0MnLGdgmbdL34z00rw=;
	b=mfMzMdOzVXoInyzepAJvJdYAKFfvblZaIthwdc5GP6Yrtl/zVZws1EZfG63wwgGVaVIh
	 VDobGVl/n0fcAMnEjHUoCKLhdrH923Mg0F7NG3zoiV2xzVUJ5tRSIsYj02iFo3zJvV2ax
	 ONKPdNdtLLanzo/gdOkrlDH/z6tvLnr8kXrOcdR1PHWvRJHV+L957dPLy1cxGPndCwxdA
	 SOchbcoCNTvlD3QSQJ43T97fHkosDaZRqXkvWerpIuQk/HLmCc3kw0iMc0Sn8ltJ5eOYl
	 9P23ZnNrSQP4m9Go6UZ0gvleNTUsSCWeYGmPL/14OFvf1Uh1pPAaeKMSMa4xkByCzQg==
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=ARvR3frD;
	arc=none smtp.remote-ip=74.125.229.6
X-Received: from mail-dy2-f6.google.com (mail-dy2-f6.google.com [74.125.229.6])
	(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 02324606A31C
	for <netdev@vger.kernel.org>; Fri, 30 Oct 2026 21:08:58 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 02324606A31C
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-dy2-f6.google.com with SMTP id 5a478bee46e88-35adc681e1aso1807230eec.0
        for <netdev@vger.kernel.org>; Fri, 30 Oct 2026 14:08:58 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793394538; x=1793999338; 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=W3z0mwrPXjDyh25V3etJIycxf0MnLGdgmbdL34z00rw=;
        b=ARvR3frDK0R4K6cAO5B8wDyq8X94HuE0ijyDCTBl+0vnuWsxrMgeBfjZQOH40GCd8P
         XMUGNH72QVl7VzRm4d159ZK+9Y4zWky99vTix6/8d8gu8teZfmnsSQxNuJkasul9FFc+
         87xn17BTS/WYte7O2aDqISPtt/VkX4ZepKF7zMjdNiVBOcLHv32Wffe5fIn/YryiT1wa
         cwuZTSb/hXPkVwYrhnk/yGH6lfWYNhPuEctGC5URmPD2OYbutPoq5mBGf6pprPxjad62
         sSDXOL61k+dqkucwR+KabTTLA3yntiWvUbny8JNclQRV3y+DT3aAhPgRybpp5ZIysD/o
         dcAg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793394538; x=1793999338;
        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=W3z0mwrPXjDyh25V3etJIycxf0MnLGdgmbdL34z00rw=;
        b=fcL5+gwAt933bW7Sj2ozhlg9MTBqlhyGeCNlG4rVA8cKr4+Kjx2Nv7eQCvwFqx9XKC
         F3HOTzZ8XoVQjYoO4PzzyaThHbC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AeLcZnwMCNWLNKR3PacCyzBqbvFV60wguewHTCYiof7aulZPFXUrXAQ5Cyacd0lNVG+i
	c+wYhqvtbCw2b4woFVBTqbTIE0IalztWn8SsPe+OuBL8+ALtr7oPY7SO0l7j
X-Received: by 2002:a05:701b:42d1:10b0:188:9ae5:162e with SMTP id a92af1059eb24-1ac5cdf9ae0mr5066603c88.40.1793394538003;
        Fri, 30 Oct 2026 14:08:58 -0700 (PDT)
X-Received: from ehlo.thunderbird.net ([168.138.199.194])
        by smtp.gmail.com with ESMTPSA id a92af1059eb24-1ac0e738445sm9657089c88.0.2026.10.30.14.08.56
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Fri, 30 Oct 2026 14:08:57 -0700 (PDT)
X-CC: Andrew Lunn <andrew@lunn.ch>, 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: <c5fc86f9-3c43-4aee-8d88-92e8f88c6d5d@bootlin.com>
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