Article View: linux.kernel.netdev
Article #8563Re: [PATCH net v2] net: pcs: xpcs: make supported_interfaces authoritative
From: Andrew Lunn
Date: Thu, 29 Oct 2026 13:20
Date: Thu, 29 Oct 2026 13:20
33 lines
9831 bytes
9831 bytes
On Thu, Oct 29, 2026 at 06:27:29PM +0800, Coia Prant wrote:
> pcs.supported_interfaces is the mask of interfaces a given xpcs
> instance actually supports. The compat table describes what the
> Synopsys IP can do in general, but a specific integration may support
> a different subset: the RK3568 XPCS supports 1000BASE-X, SGMII and
> QSGMII in hardware, but does not implement the C73 10G or 2500BASE-X
> modes that the Synopsys compat table advertises.
>
> The Rockchip glue currently advertises only SGMII, since that is what
> the RK3568 MAC side supports today. 1000BASE-X and QSGMII can be added
> later when the MAC side gains support.
>
> Without narrowing the mask, stmmac_phylink_setup() merges the PCS
> supported_interfaces into the MAC mask with phy_interface_or(), so the
> XPCS would contribute 1000BASE-X, 2500BASE-X, USXGMII and the 10G/25G
> modes to the combined set. The MAC side forces the phy modes and
> phylink start passes the mode explicitly, so this does not currently
> make phylink switch to an unsupported mode, but the combined mask still
> advertises interfaces the SoC cannot use.
I don't know this code too well, but something does not feel right
here. It might be due to the way stmmac does PCS with phylink, which
is often considered broken.
What i would expect to happen is that each piece of hardware indicates
what it can do, and then phylink finds the common modes.
So maybe stmmac_phylink_setup() is wrong when it ORs them together?
Maybe look at other MAC drivers using pcs and phylink.
Andrew
Technical Details
Message-ID:
<20fb8d2d-a20e-472b-8f32-3fe2fec9a425@lunn.ch>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353298-linux-kernel-netdev=dewy.ruReferences:
<20261029102728.3189359-2-coiaprant@gmail.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-353298-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2] net: pcs: xpcs: make supported_interfaces authoritative Date: Thu, 29 Oct 2026 14:20:56 +0100 Organization: Usenet Network Message-ID: <20fb8d2d-a20e-472b-8f32-3fe2fec9a425@lunn.ch> References: <20261029102728.3189359-2-coiaprant@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="2014408"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:4AVcfsQdzmlSeUSvoB2s5Rdu/bo= sha256:I1uA9Nsf78188nhicm25MPwvqPkj0yDzrLIzD3CH6Es= sha1:rYgJoa5Sqtg77Pvs7IK5LZ2pIxA= sha256:wUFB3ek+Bqo0BGXTvcmO6deozAW0KGZrqne0F3xrBRg= Content-Disposition: inline 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 5D902125C68; Thu, 29 Oct 2026 16:21:32 +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, 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, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=lunn.ch 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 GC_Zo1pQR0K5; Thu, 29 Oct 2026 16:21:29 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-353298-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 1CD66125C65; Thu, 29 Oct 2026 16:21:18 +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 9C30025DAD; Thu, 29 Oct 2026 13:21:10 +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=1793280070; b=V4Dw9dPXoe2u8YM+3srATX67si+auqgLvQjF5RiiAFgEUGl/3/c/jLJmYt3PZbUDd4w5 sHT+ReM1uHp7ya6JGmQP41r7Cj8xJOOiZlUus9B9KZb1qk3lpCgHUF28i9e42UxgwWRgt mbxSly+h8G2qcLJLw4iJCjEJrBuShqRKzUONQaMXxOfHeVXgZDybu0eOBk7mtffQHYT3J ReqJGCbQWaPGgqt4iEwc4ExOI82D4Y9XnMyhBeXYoCOiUEf4EHaY2RypL4cAppjJp4vAy bV6MVkboOF0JbcBQJ+oQm0q2xOVLVQ1o2NI+Irm7Z4Ol1UNi2tJiuSyuxn8IUEWJjIA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793280070; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date: From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=Lp2fs7ZbOlVXklezlvUcMAOoy4OS8c7SUAwJ7l9dS4U=; b=V1C/yTbgFtduu4IY+m9omL/s4wTSP+mHwBtgzI+UnolOdjLNMKMfjjDOu3/KetL5OV0o +SxFPE3Tj4mFkxvB0K2JU0PoCz7D6eU8z10yWhRtc4r30TnS4MxcrW3EofYnplOccWzjU qdEqO7U7XxH5yOZr3dg3JPu1/vntBnNBLssK6QX/YSOnOG80Mp8K8py9tlXZCsQkwb8eK B1nqiduaFtDCfEaTqhjCTlYNMsTS2YCKzQWriUfeKsrRaI3CwOxfRiozYciNx/43rrv7v KHD25ShTLzxcc/BQh6bWcEdY/ZSz5EcUityoYsYKM+xiE1TxoJFvQi2D6C+Q++BlDDw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=leGq8Tf0; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; 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 6DA68606A323; Thu, 29 Oct 2026 13:21:10 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=leGq8Tf0 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793280069; b=fXJAkvFwmIMGVIEA7C5VuUzfkZ39PfoDfmAX76pCMYJvjavZoMam6XbAikOqxY7dUdYk fKASRCsH98o46/Kh/BIqCJVqnY0cVQVj6R03IEM/cyiB2LUibUfaqIOtZakw3o/h4LYtN ifkFWMzi39Hf5LTn9wsfSWwxN8UY+Efv7YkSDB8oz68Fv9ZkB4K6mAOZJPtRL66UVcAsW GLbdXofOUstayvZ3Rt5hQe0EWnd0t9ey/q47njb0E3ctgeH/IXvI+7YML2J2I1SzcWr52 qEUxtrSPMEBhwzHgpAoPjh4uhUJtJCs1V+f9g2CJdbaX8/gqFfd5/TQByqw/jauDSLg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793280069; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=Lp2fs7ZbOlVXklezlvUcMAOoy4OS8c7SUAwJ7l9dS4U=; b=gePRLV5VmS4l2PfZ1qcgJkl7UrbfnlKPWMNIXrvmovSWcPtTE4c6cxEUvvjDb1VQdNuz rimJ9e9pQDKk5iRgfn+elpI9KiaYKi7IHTfckykPyMkYbEkWLuIbiiYSFMLME/lSQGzA6 Re1kMB3dDwwmrRPynT8mOJfrTw/Rm99Ec3rSgSA7AqGrTHppxEQzmOR3SCtye7FxWY28u iiYx/hHE5Z+Ks7UxQYRVCXV/ZpYu6l+5wbvLQjBkml3cxYvYh4tmNghth54K3vkJZuKXO qL00WgExmjfhoJVEEVXi9MRJ4MR5CGMVmrw/SGDLHcHJth5UPzT7zkF0ZGdFRZZSA7w== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=leGq8Tf0; arc=none smtp.remote-ip=156.67.10.101 X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E072B606A31A; Thu, 29 Oct 2026 13:21:08 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E072B606A31A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=Lp2fs7ZbOlVXklezlvUcMAOoy4OS8c7SUAwJ7l9dS4U=; b=leGq8Tf09kTUwEEAi91ZrEPch7 ZGhH+SiiG9cZe30J9nFJiyUGEnHOhLDZiKuXiGXNCsGhCaWcU4hS9NvsmfXu0xmaLUWnU40ivacZ8 zwoV3cId8aLBbJw3aqyTZ7gMKBUne4RLvf29dC74W0MJi8VOITEiXubvKfgG+EXmu9Bw=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xMQ3s-00DFRE-7P; Thu, 29 Oct 2026 14:20:56 +0100 X-Cc: 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-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 X-In-Reply-To: <20261029102728.3189359-2-coiaprant@gmail.com>