Article View: linux.kernel.netdev
Article #24640Re: [PATCH net 13/14] net: phy: as21xxx: Fix speed and duplex reporting
From: Andrew Lunn
Date: Mon, 30 Nov 2026 14:01
Date: Mon, 30 Nov 2026 14:01
50 lines
10597 bytes
10597 bytes
On Mon, Nov 30, 2026 at 02:21:12PM +0200, Cristian Ciocaltea wrote: > On 11/30/26 5:50 AM, Andrew Lunn wrote: > > On Mon, Nov 30, 2026 at 02:55:20AM +0200, Cristian Ciocaltea wrote: > >> With autoneg enabled, as21xxx_read_status() derives the result purely in > >> software via phy_resolve_aneg_linkmode(). That does not work reliably > >> here: the advertisement is driven by the firmware over IPC, which > >> ignores the Clause 45 AN registers phylib writes except for the maximum > >> speed, and arbitrary subsets of speeds are not supported. > > > > So the firmware is totally FUBAR? > > > > So autoneg does not work, other than for a single link mode? This > > suggests you are setting phydev->supported wrongly. It should have a > > single link mode in it, the top speed the PHY supports. > > > > phylib should then do the correct thing, it will only let the user > > select that one link mode for advertisement. > > As previously discussed, the root cause of all this unexpected behavior is the > firmware limitation: it cannot handle arbitrary subsets of speeds and always > advertises the full range, from the minimum supported speed up to the top one > (the only limit that can be enforced). > > aeon$ ethtool -s eth1 autoneg on advertise 0x800000000000 # 2.5G > > peer$ ethtool enp0s13f0u1 > Link partner advertised link modes: 100baseT/Full > 1000baseT/Full > 2500baseT/Full What happens if you return -EOPNOTSUPP here? Does it make it back to userspace? I don't think it is guaranteed to. This is probably the first PHY which is broken like this, all other vendors are capable of reading 802.3. So we don't have support in phylib for this sort of brokenness. Maybe add a new op to struct phy_device: /** * @validate_aneg: Validate that the PHY can actually advertise this valid * combination of link modes. * Return 0 if it can, -EOPNOTSUPP if the PHY is broken and cannot. */ int (validate_aneg)(struct phy_device *phydev, unsigned long *advertisement); Call it in phy_ethtool_ksettings_set() when not NULL. Andrew
Technical Details
Message-ID:
<7ce66121-c353-4723-beb4-bb9234ff2671@lunn.ch>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374244-linux-kernel-netdev=dewy.ruReferences:
<20261130-as21xxx-fixes-v1-0-1bd2eae6ccbc@collabora.com> <20261130-as21xxx-fixes-v1-13-1bd2eae6ccbc@collabora.com> <285d83ae-7c91-44c4-a37c-7c4201c11211@lunn.ch> <b2e18939-e254-4fe1-a81d-fcbf583fb0b3@collabora.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374244-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 13/14] net: phy: as21xxx: Fix speed and duplex reporting Date: Mon, 30 Nov 2026 15:01:22 +0100 Organization: Usenet Network Message-ID: <7ce66121-c353-4723-beb4-bb9234ff2671@lunn.ch> References: <20261130-as21xxx-fixes-v1-0-1bd2eae6ccbc@collabora.com> <20261130-as21xxx-fixes-v1-13-1bd2eae6ccbc@collabora.com> <285d83ae-7c91-44c4-a37c-7c4201c11211@lunn.ch> <b2e18939-e254-4fe1-a81d-fcbf583fb0b3@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1441062"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:25xSjcXUQTwRBeicvRk0G0ojDCw= sha256:G2QLQtN/17uN/4JO+V5+bFb9WjymDp2nRVYOPApYOGM= sha1:jf06+75oKpwOw2+K3sWrZeKaZmM= sha256:D633FBInOv/Odhg8j6zpmK2eCGmhsAj5URfUm6+Oqe4= 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 E5754125FF0; Mon, 30 Nov 2026 17:02:07 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 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.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 (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 sgMvZf_veA8g; Mon, 30 Nov 2026 17:02:04 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-374244-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 1C2D9125FED; Mon, 30 Nov 2026 17:01:56 +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 74B4331562; Mon, 30 Nov 2026 14:01:37 +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=1796047297; b=5OXm2ytQQZElMkXJMRtR1rBWgxBbysj8a1x6eITLn7piUD+r7BJLMyJKP/X9ctgGrkBa eHq6eyK+AUzQ4NvaWGiwJaubUC73C/iQbcCTDZ1Zy7RPkL/JJLcL87O3H+4ycMi2177b3 N4kaw3/62H9Y4zM96Ngan111X+3wo473VfVA3TlJ1cSNTpaZZgVXi42scbC0HVzew2K3o IjyflD2xONUIs4ZxjBaMpLmgod0kXI8nytjWpjx5jYWBiCK4sbq7q6aJc7tRshM6LR4en rlVeaUVbwUKNdSP2THrfbQaIy6lsDE2pM18w1L+665k0HeZ5BqAz2nPP0yi5Er68UDg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796047297; 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=pnDPlCAhNixQh+7X5IH9wP3FVxOAUFQuoV9NyPWvnFY=; b=hdvfwVwFJdANYklRkTUYmDeErmcQGzUyUpa4BX7qjhMmmJ82TkVdq8lNh55ApzgdD0ep OZEU9D4JMRGpXOTmQNaKRj+FsAPdfvFaAuz7mTnoFV731WEqMKt3sGtob5zl8z0TOiNMt hKB9jzpo1Dz5yW2TD666OOIP/1rSWa5itQAKt7v4rvSLwBTAjSqyv4K/IEVGnZfgwY+lW W2SxlfR3jEzUgooI7V2J0YD6GePCCgJAVwywnTwYPUMGTUFq0CMrjim4AKvTRpbKCs1JA MIYRiN1tmzNkzmR/gwtJZefTI/WLH9/KKkapJH2L2iIfucoloyZop9nXNtcSlyyQNIA== 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=qcG4nWQj; 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 4AA06606A32F; Mon, 30 Nov 2026 14:01:37 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=qcG4nWQj 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=1796047296; b=moCp3+Vo7iVosw2nGZQut6kU/xZdKm9mhZPYLAF7okpcZSkpCZWqUws3J7ycSvUJeG9c aKr8XUrxz3Y78I31J2Es7xDNT9hG+ZO3tYsRwohg0ZlrTvKdSDQhCjij+lmwMDI9i+Tq3 18f90oQDojiDFR7euq4adh7JfqUxm8IYJtt+jcCkCEEu3wDiWckP5OGZ+TUzjGQ/mceyx ZpI+aQWGQaPRwiJKoLgSz1wY4QLL+Vq7ZdRgu8HXj7mJWnOekxMec5+VH5g6SuIkFiNAs F1rUS5Llq5FhuV7gMfWLRvHdM8NP8a3LhbCxyIVdm4ul6GYkzsu1vgcSuRTCHnU3kXw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796047296; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=pnDPlCAhNixQh+7X5IH9wP3FVxOAUFQuoV9NyPWvnFY=; b=PJtJLdbl+PGQmBMg6RtropRzrwBPHIZQsNmUmogftQ4Oy00M1lSu4zTp7sDrr3rzqwwn Xnm01fP+Bq4qYa9zSa+cLJmkcOtamtgVoQqsri7HaIUcqcZrLinTTdtgNxnk/5k2PEj3N NQpM2By+7mJHMvz3Iz9Q4MCKQItABiEhk0O2y2+OHAKAALna3W+rnvwDyxR8XykcXUDIp C9tMsygIhoyopdehZseULUzVqXcYxz6M5cf9TDSFGsqBy5mYKNC0cnxLWrq22VbcXZT5A zWW5xs4F9pvBQAkv/Wj5+8IPNZ4Etk9+3/nRMYJWecJ0LumcS+lcNJJUm8mf+V+DUcg== 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=qcG4nWQj; 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 2929B606A327 for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 14:01:36 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2929B606A327 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=pnDPlCAhNixQh+7X5IH9wP3FVxOAUFQuoV9NyPWvnFY=; b=qcG4nWQjRu58ST19K+8meV3Q0h 4sgildWGVizW77HciR3E/BS5knwQbgWpMyrwC3JZCwdKT6TNijLwcvduuJz1JOU/uVDTLf9QRnMu1 p3UmgbOY2ROmb74sqbLcGfXBeR7MAulw1/NHDeo4bxxNNmL5HfYHdU4TIdqq6ao8j/Lo=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xY1wY-002Nih-Rp; Mon, 30 Nov 2026 15:01:22 +0100 X-Cc: Christian Marangi <ansuelsmth@gmail.com>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, kernel@collabora.com, netdev@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: <b2e18939-e254-4fe1-a81d-fcbf583fb0b3@collabora.com>