🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #12548

Re: [PATCH net-next v2 2/3] net: phy: realtek: return MDIO read errors from hwmon

#12548
From: Andrew Lunn
Date: Sat, 07 Nov 2026 17:18
31 lines
9613 bytes
On Sat, Nov 07, 2026 at 06:00:46PM +0100, Hleb Shauchenka via B4 Relay wrote:
> From: Hleb Shauchenka <me@marleb.org>
> 
> rtl822x_hwmon_read() masks or shifts the value returned by
> phy_read_mmd() without checking it and returns success, so a failed
> MDIO read is reported as a temperature: -EIO reads as -2.5 C and
> -ETIMEDOUT as -55 C.
> 
> Return the error instead. Once the sensor feeds a thermal zone, the
> thermal core then keeps its previous state rather than acting on a
> bogus reading.
> 
> The problem was found by an AI review of the previous posting, and
> this patch was prepared with AI assistance (Claude Opus 5.5). It is
> build-tested only: I could not provoke a failed MDIO read on hardware.
> 
> Fixes: 33700ca45b7d ("net: phy: realtek: add hwmon support for temp sensor on RTL822x")

Fixes are not wanted when targeting net-next.

You need to decide, is this a bug which bothers people, so should be
for net, have a Fixes, tag and Cc: stable. Or it is a problem which
nobody cares about, so can be in net-next as just normal development
work.


    Andrew

---
pw-bot: cr
Technical Details
Message-ID: <2bb14f43-2c96-4d6c-9dca-fd8d7b2a37f0@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-358438-linux-kernel-netdev=dewy.ru
References: <20261107-realtek-hwmon-tz-v2-0-6b9a69d44470@marleb.org> <20261107-realtek-hwmon-tz-v2-2-6b9a69d44470@marleb.org>

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-358438-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v2 2/3] net: phy: realtek: return MDIO read
 errors from hwmon
Date: Sat, 7 Nov 2026 18:18:45 +0100
Organization: Usenet Network
Message-ID: <2bb14f43-2c96-4d6c-9dca-fd8d7b2a37f0@lunn.ch>
References: <20261107-realtek-hwmon-tz-v2-0-6b9a69d44470@marleb.org>
 <20261107-realtek-hwmon-tz-v2-2-6b9a69d44470@marleb.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="4170302"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:5qewzHbydKQ3QWR2VY8nSdmFKKc= sha256:3We2j2OqWpu8/lrsYr0MgeJZftRJWjmvCjhEUvf0dG8=
	sha1:pt9nhJGsPIu9VRsblkhBLho7pbw= sha256:Ki3gO0U7YxeDThKI2w67eV51afgyAhzE32GyjEg1B+U=
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 91772113484; Sat,  7 Nov 2026 22:02:54 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.95
X-Spam-Status: No, score=-1.95 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, 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,
	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 lbe5T0FFd0Lg;
	Sat,  7 Nov 2026 22:02:51 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-358438-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 4683111347C; Sat,  7 Nov 2026 22:02:40 +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 383C365C82; Sat,  7 Nov 2026 17:19:11 +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=1794071949;
	b=Uf4cd2Xw0dVQQOMvzB4GWjozqmMUR47Lkn/V3pyaFeFz5Mw8lNVCSldGFRElc6tjD61G
	 j2A3+HwSKYHX+8akKDlsTkYioPvVMtpp/7SiPmkH3yNG9tK+eJ7NBld79aCv2yqGrFzNm
	 Eyj5QWzcKYkGxMcX6SRyftjgrfEfDWhKrm6OsKuatEr1gkBkGnwUeY7CtvZwwailLr0ne
	 wo0Vtus85IYT6Hp8QOsl6T1Z+CDrYaEmJG4pWwRMKwoBlk3m1evQd0P5zd80zVA99/o4g
	 STM5JD4qhfhBVGco9tRBLXirWKOVDch2k+XZU/nnfup+ci93z7BCdmndT2FZ6EY8xPg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794071949;
	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=i0EgZ8Yfz6pkJgZyBs7peXGWo7SB2ASDmUP9uK36Nkc=;
	b=KbeD7gd4RVaFasUDzRO09vKoPQuBw8In6SsHWsKCovZqpeRkY2MWBFvQu15GyRx6vwjZ
	 bdaj3TGLXhA+VRImlJaJNvs+xz/f4duBQ2QArJOcOWbrSY1Hykg0DRRda8fYDLXqI3sZI
	 JUMWBQCPwu1gurIf/PfSGzBlxuaxuifpsmiHyfzHBieC1wfJNeiUhFrNyTDPAat5Zhyty
	 Uj7Qp+TbeWhizCcDJhtCzFU1N6ME95JeiOnTeDVGAhGsn/f+tr0VGKg9Zp5/VNPD4N2rv
	 2frmyaQHuSlqPGxRpvZT6Oi7GN9aB7cNylNcZJqVZRM3xiWr8EU7kbHB0UIrLPVC2eg==
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=Gq1btOFo;
	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 D90BB606A330;
	Sat,  7 Nov 2026 17:19:09 +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=Gq1btOFo
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=1794071939;
	b=hTVy8bb2GB1FnnsOgw7wLdjvpGZhT63BiHb1oUhq2BAvZC2wc6wWOd6nFesfN6Ugs+Nt
	 de1OvJlzTzeK+xZpKOgKw7NgJk+ei/pa+NIJ9KnXfRnr3DoXM5rakBNO7BvVEgViftvrh
	 Wh4Vui4EqykMgFt08Jn+AAnXnpqfE1vTPVpvXux8CAVwWmJDk+S3G2jOgHc+VLQv01EN5
	 xz+PZJ+3LLzOWqwuST42ufE7c+IWDJgkY+2Kbt3e2FspDfQ6rGhnz1XbBFI8U/Y7w/hSn
	 EX14Hw/DkpJuu8GshrxbVaHlDKdrTbx1AXLCztMw6KG8g5NNHJ+beV6iv316Ty3w2eg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794071939;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=i0EgZ8Yfz6pkJgZyBs7peXGWo7SB2ASDmUP9uK36Nkc=;
	b=DSSm0WtjL46nXUgUigOGIvS8VOhMXUDUYwddmBs7jZwL13V2mMP8wKo2u75KXrB8TbEh
	 ute6mUnX2KTigLV/dL1pDcN9PRR9hrjFwDcLWdIeekZmN1gGJlZnvk8Vsw/ovqsJAq1cp
	 U0YZx2hBYYjPS1RoTnNai+GF8I5c2IfTFTnjtIzx3smeNW256JX+Xq3BkNPk0iPjoerHq
	 RGPWD83kyJBjVYAghH9QwqtBBaE6TrUO+MheXGyFtQg+uM4Jrg18AwcZ9ic4G3OvgRLh4
	 StUZA05Omhkn7PxIZIonWhRsJ09OooOVWHCIbRNIyDdoIsITnn9eFYmXAodldnup5Ug==
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=Gq1btOFo;
	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 1D8AA606A326;
	Sat,  7 Nov 2026 17:18:57 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1D8AA606A326
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=i0EgZ8Yfz6pkJgZyBs7peXGWo7SB2ASDmUP9uK36Nkc=; b=Gq1btOFogxZ3JAy+dQDbg26wlB
	P4bQGUgB2a+jtc4PnytTFq0/eazN5150TCQziTlD3fvBGA5TjUe1Sj+Yh2FPbzDZrlL/ajSaE6crr
	6U35BgNWDPEoBvzTVHBLtAgb5TqhRrynQJc+Gzb066o1jFkdEZebnJshQauvHk6VpdJs=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xPk3x-00Ez6p-Gm; Sat, 07 Nov 2026 18:18:45 +0100
X-Cc: 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>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>, netdev@vger.kernel.org,
	devicetree@vger.kernel.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: <20261107-realtek-hwmon-tz-v2-2-6b9a69d44470@marleb.org>