From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 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== 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== 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 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 ; Mon, 30 Nov 2026 03:34:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 79A3E606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch 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 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=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1xXs9q-002H5a-Oi; Mon, 30 Nov 2026 04:34:26 +0100 Date: Mon, 30 Nov 2026 04:34:26 +0100 From: Andrew Lunn To: Cristian Ciocaltea Cc: Christian Marangi , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , kernel@collabora.com, netdev@vger.kernel.org Subject: Re: [PATCH net 11/14] net: phy: as21xxx: Read 10/100/1000 link modes from C22 advertisement 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> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261130-as21xxx-fixes-v1-11-1bd2eae6ccbc@collabora.com> 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