Article View: linux.kernel.netdev
Article #24345Re: [PATCH net 11/14] net: phy: as21xxx: Read 10/100/1000 link modes from C22 advertisement
From: Andrew Lunn
Date: Mon, 30 Nov 2026 03:34
Date: Mon, 30 Nov 2026 03:34
23 lines
9364 bytes
9364 bytes
On Mon, Nov 30, 2026 at 02:55:18AM +0200, Cristian Ciocaltea wrote: > The Clause 45 ability registers hold a single bit for 10BASE-T and one > for 100BASE-TX, so genphy_c45_pma_read_abilities() derives both the full > and half duplex link modes from each of them, even on PHYs that support > neither 10BASE-T nor half duplex. > > Read the 2.5G, 5G and 10G abilities from the Clause 45 registers as > before, then take the 10M, 100M and 1G link modes from the Clause 22 > ADVERTISE and CTRL1000 registers mapped in the AN MMD. The firmware > does not update the C22 BMSR/ESTATUS ability bits, but its default > advertisement reflects the modes the PHY actually supports. If the > advertisement reads back empty, keep the Clause 45 derived modes. This is funky, i'm not sure this is a safe assumption to make. Is it known what this PHY actually supports? I think it would be better to just accept the firmware is broken and hard code the 10/100/1G link modes after calling genphy_c45_pma_read_abilities(). Andrew
Technical Details
Message-ID:
<91684d78-c827-42e4-9563-c3ce1dcfe6be@lunn.ch>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373811-linux-kernel-netdev=dewy.ruReferences:
<20261130-as21xxx-fixes-v1-0-1bd2eae6ccbc@collabora.com> <20261130-as21xxx-fixes-v1-11-1bd2eae6ccbc@collabora.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373811-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 11/14] net: phy: as21xxx: Read 10/100/1000 link modes from C22 advertisement Date: Mon, 30 Nov 2026 04:34:26 +0100 Organization: Usenet Network Message-ID: <91684d78-c827-42e4-9563-c3ce1dcfe6be@lunn.ch> References: <20261130-as21xxx-fixes-v1-0-1bd2eae6ccbc@collabora.com> <20261130-as21xxx-fixes-v1-11-1bd2eae6ccbc@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1322293"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:fvlyHBINY7Y3kqgXZVTd/HfKER0= sha256:hdHOA3xWfTN+3r8OVIGXhZccSZx2UdAlj9y5SlEQ3h0= sha1:2Rap2iCv+UXmXsijTQnopOordJo= sha256:RxNNRYJIto62ka/ErC1QP2Gi9RYziQcMyDAF7PAdHXE= 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 07FBF125F08; Mon, 30 Nov 2026 06:35:03 +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 yZXfzccNlDei; Mon, 30 Nov 2026 06:34:55 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373811-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 432D6125D65; Mon, 30 Nov 2026 06:34:45 +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 C204C27118; Mon, 30 Nov 2026 03:34:41 +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=1796009681; b=sYKj6dIblWUZAP58Oulp20xQqoJjBmLWnqPVW454+RvSGP6/Q9xk557Ev6apTl62HYiN IyBz7Z3tcNhKmY8u4Iyj/8IcG+fCzWRFcRuQq+Aj9Ysxz2utDR+22cwOaNU8b1FXdJlSA 7G7GQpCFKv+KHBXRjcleYJpxRSsP3pLUesLhDkvkOPoASOj1+Zsyw6WK16Km9vvSkfzGc DLKmRs7pRzieTIN7aKQ/9ATvyDDpA7XBlwSVHCFbsVF/x3b3j3YXDvstJCm8uDpDA7e11 Mtr/Zj7+bQ/MmXiOouLiWrp1zGFIbPtArD0303P/Dplg5UXpYQ2sJf8nFniK+UL5r3A== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796009681; 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=MrlPHwH54V9iWHZlwTX+5Fei8ZgoIOMCs9niUDMwJZ0=; b=E3WZxiCoEM+qGWWjKb2VFZ+eYO0CT/d4+5EPK4trkWkNYXfWhVYLugooyZIuaFSN2ul3 +8YAFrJ7S6rY92FHH20cBKfNXzMBjGX4JnNXYQiZR97YJjdP9OxrVtWpWXtnyQpZHhSQZ hBxJFdXCMSc3d2V0cK7Up0CJ3sBOSi33FDRdUabC+rZPbCoaepIfZQxLGBNL7FxYfe24G OohxT23JSMCqgz9RC3ha2pzzkku1MbH2Y8VNdbDpil79HEOJPG0fuqWCmaoxc3zQfOaHG m6tmTa45MVmJIIJaM9O1wjooHYU8t8Pt/Djb7aE8OkeYvfN1fWebikr38EV0uOyS+xg== 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=nrKRb6Bj; 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 9ADDD606A32F; Mon, 30 Nov 2026 03:34:41 +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=nrKRb6Bj 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=1796009680; b=0LXzDy3vGizHWKZuxyQogEavNUBqF95HxuHq2mssrGIowN3J47G0B6xl9uclaAjOLpD+ OxhMGYWBmFoKYXDsRYWiIIqZIgjVviv6yKzuljJr1jIfdMRv3a49sMS2z73cBaSMWIkBy bjndWOJuyLsXYAkU4QPyrdnf8ssjz6gqDOmsTIcOaTMw9AUc/DU8wCqSjKPsdu+K1dBP+ AY1QT76Tjiw869OJEvQ3a+BauJyBy/tvlw6fGf426sXlWMWHXIjc8FzGVt14kQrHfOJcf Z2ggBpGnyneeQTDn/4c54Gl8zUQZWZ+MBnAIg/S+oN8P1oiHNI3iJUBhKQeUoveCwUg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796009680; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=MrlPHwH54V9iWHZlwTX+5Fei8ZgoIOMCs9niUDMwJZ0=; b=Md8WxVa0rt8rBNbMfCgh1q1b8dqp9JlFa9tlPR75sg/ysFNupvfJFE1U/IXQTXM+ZZby es7qSMMHhro75AdynqZpJqWBCS/ZEaUrZ/ClOXhHPPXBU6JgOApD6Eq8PWt+HhK7WD0VV Mn5kPpifK4SGKIacxSM/mCmrf86aJKqlORhyS3C7TeUKknr7yhA2HLh/P6+0q7AxPGpuZ luKPGYlkTt+MB542e+9JdU9PU96Q5Mb9kTBfdT71nr8KV41GsKahX1nRi8yHffzITx1x2 U91Iumu8cS62oq64o+SzLyvhwOqnb7FBDRDjFNkWBopKUCwsyqnaxlFE9C5+bv75BKw== 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=nrKRb6Bj; 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 79A3E606A32D for <netdev@vger.kernel.org>; Mon, 30 Nov 2026 03:34:40 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 79A3E606A32D 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=MrlPHwH54V9iWHZlwTX+5Fei8ZgoIOMCs9niUDMwJZ0=; b=nrKRb6BjL0Ach37q+4VMZu/c0h nKTHW7jtJovKstfGwxUavnVGu+rULrauBiN/86X4VtE1Lr8nwC2TM3pkFtVR8Cs3RMiiWsAiZLHy+ U9AVLY0C6No8qgOv7HmU9OOXyEmshmQtcX/P9u4rarVZGBLxJAeiwCH6av2Gu/KkjJZI=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xXs9q-002H5a-Oi; Mon, 30 Nov 2026 04:34:26 +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: <20261130-as21xxx-fixes-v1-11-1bd2eae6ccbc@collabora.com>