🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #22446

Re: [PATCH v2 1/2] net: phy: motorcomm: return -ETIMEDOUT on BMCR reset timeout

#22446
From: chengke
Date: Wed, 25 Nov 2026 09:56
43 lines
10439 bytes
Hi,

Replying to the automated review of this series (this is not a repost).

Regarding patch 1/2 ("net: phy: motorcomm: return -ETIMEDOUT on BMCR
reset timeout"): the issue is theoretical, not triggered at runtime. It
was found by code inspection, and I do not have a stack trace or kernel
message to quote.

Reasoning:

yt8521_modify_bmcr_paged() polls BMCR_RESET with a 500ms budget
(500 x ~1ms). If the loop is exhausted while BMCR_RESET is still set,
the last __phy_read() result (the raw BMCR value, a positive number) is
left in ret, and the err_restore_page path hands it to
phy_restore_page(phydev, old_page, ret), which returns it to the caller
as success.

This is very unlikely to trigger in practice: the PHY completes the
self-clear of BMCR_RESET normally, and a >=500ms hang of the self-clear
would more likely indicate an MDIO bus problem, which would already
have failed the __phy_read() in the loop. So there are no observable
symptoms today; the motivation is correctness only, so that the helper
behaves as documented ("returns 0 or negative errno code") and does not
mask a stuck reset.

I also checked all callers under drivers/net/phy/motorcomm.c
(yt8521_soft_reset, yt8521_resume, yt8521_modify_utp_fiber_bmcr,
yt8531s_set_downshift added by 2/2, and yt8821_modify_utp_fiber_bmcr):
they all treat "ret < 0" as error and propagate it, so a negative
-ETIMEDOUT return does not introduce any new failure path; it only
converts the would-be positive BMCR value into a proper errno.

No functional change is expected on healthy hardware.

If reviewers prefer, I can respin with a "found by inspection" note in
the commit message in the next repost (there may be one anyway for
patch 2/2 review comments); per the bot's instruction I am not reposting
just for this.

Thanks,
chengke
Technical Details
Message-ID: <20261125102000.1847020-1-mjkchengke@163.com>
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371218-linux-kernel-netdev=dewy.ru
References: <20261125085509.1844883-1-mjkchengke@163.com> <20261125091638.1847020-1-mjkchengke@163.com> <179559859720.3294.18444813646422214701@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371218-linux-kernel-netdev=dewy.ru
From: mjkchengke@163.com (chengke)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v2 1/2] net: phy: motorcomm: return -ETIMEDOUT on BMCR reset timeout
Date: Wed, 25 Nov 2026 17:56:56 +0800
Organization: Usenet Network
Message-ID: <20261125102000.1847020-1-mjkchengke@163.com>
References: <20261125085509.1844883-1-mjkchengke@163.com> <20261125091638.1847020-1-mjkchengke@163.com> <179559859720.3294.18444813646422214701@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="174573"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:5kIx42/tX9/PdYIEb9OQUx1q8cQ= sha256:M3PAdgoKLFzVZMlYYKy6M0bTuzg8Ri4NqPZUtzHdWPU=
	sha1:SmIpUotSg/t7NCO7DuV6utaHyxk= sha256:2fAQ3pfmMAfzeC2ezAsJMe6dZcXQnt2t1WHCZOBhjgY=
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 7E282125E52; Wed, 25 Nov 2026 12:58:20 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.148
X-Spam-Status: No, score=-3.148 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
	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,
	UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=163.com
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 u41abozQO49V;
	Wed, 25 Nov 2026 12:58:17 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-371218-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=163.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id B702C125E47; Wed, 25 Nov 2026 12:58:06 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id C1DDA6074F2; Wed, 25 Nov 2026 09:58:05 +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=1795600684;
	b=ahRmLOK7/+pS3lISn6Phimr3u2C8IdA5bQ/STCfjFJCrZFP1OlJUKhG6x0fJkB96eIEs
	 Aue1fLAskJpWL169gWqAp4P7yGNicgZDeOWMb1Pzjwgt3mtnc2f/cQl3KCSMmODvCpK3U
	 h7v+adKxr5JCZPmncJQl5FKqvqbkLh8ALFTC+02Mmi7N/siyLghA/eQOJQy3JJ28nRmuL
	 ZQ5L63UZ2aVoj3kNdrPsE4x3mAV6dBzeihQG1YXsoDCbhqrJiavXmc5jppGW4YhQA0gmq
	 nE4G9pq5YYaBU+HePPRSJMhZu5dhPrAI9+Rm4EXs4tOGfAHehmxGNfjmNZw2GGkMIQQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795600684;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To:
	 Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
	 Content-Transfer-Encoding:X-CM-TRANSID:X-Coremail-Antispam:
	 X-CM-SenderInfo;
	bh=Nxu6L2hKXuOq/BQVilmRWHy36RXgS3d5UsMYxm7Wdek=;
	b=O+FpA/Qg69MSDeHEgfShUP/J0Ynh6+cWCM4oH6ZycxjaKeGGHa0lIIRi45QWLUYGdsGb
	 T91ZVF2oX+yGxiU9WiRD83GnSvQlyHBSLOQQ2livdJhOu57nrcSh7lf7Z4CW/TIDoUq3e
	 CkSrbMFNFl2t9E47nkhqS06zNqY3eILNodvbBFkB0Y22cMjhPFSmg09UV791lluZHrDjg
	 TwDUE5Ry8QwOdKm0oy5R4y/r2KvRLaVEH5qsyB63VREvJVgk+EVGWjkdSPeK73O9k1Neo
	 uZpiMTaO6bVzimQJQoxSfIe0T0B4gJGzKBIsdhHakfY2xCz1D63lLiDaOqr/1I/jHOw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=Q9+Bmru0;
	dmarc=pass header.from=163.com;
	spf=pass smtp.mailfrom=163.com;
	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 21E5C606A329;
	Wed, 25 Nov 2026 09:58:04 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=Q9+Bmru0
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=220.197.31.4
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795600683;
	b=GtOLat1Vj7LYR6JohANreWp4pZ1SfsJ+ZjlGlX1o1xr1Pk/Uf6kjCFjrO2xw513ncZK4
	 ZBDDIdm+vMsHnLw5A4jidHHxAq9kn9hEFEskL6YROnnf88Y4z8IXj8KNFw1VzM4kCCfaN
	 gkrbabiQ5QC3ugapXvLjDdhZ62HfL8w+eIl+tEzTykj4HsAJKI6QqGPoE7IYcjm93IMZD
	 3JGJmHnCy4nOzUSxNbO5ESlxkvqKCEVyxGXpLMyvmMlyGo3hSelXZcGAD4UGgweHHo76Y
	 dCmQAvzmsVg3WBLHmPZTD02J0R5OkJWaeasPEeyymtuTO97RmrlDM5vkZyqb2dOf04A==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795600683;
	h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date:
	 Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:Content-Type:
	 Content-Transfer-Encoding:X-CM-TRANSID:X-Coremail-Antispam:
	 X-CM-SenderInfo;
	bh=Nxu6L2hKXuOq/BQVilmRWHy36RXgS3d5UsMYxm7Wdek=;
	b=yHZnXmWAva6kFx3byR+E3dNLhxltAfu556MzHk4+A6zEDrhesZpZ+WKablcXuJNfS341
	 LvunP3JvwmK3nFNX7HPtGLbSpIQa9+vCcL+lFtMVmHTi7q3RR3pvLS4hTpUmPyYqgl4Z/
	 HTxk8ZqOCIU6N85Qf+euAN/KwU202uhPcbCiDpo+leHqTxOddNfdt4fvUwcOfeEhvsI/N
	 ksHI5B+j+pW0PWWxM77O9p6bGCT+6CCWCCqZWwrbaD3gl2NcVlHu2+bRJvweTrdl7/x0a
	 aEI8itIzpCfo/tazpzVZKaDcXs08PZBOWtG+6ol17npqFF7aoY1jQNObsTozipoWOSQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=163.com;
	spf=pass smtp.mailfrom=163.com;
	dkim=pass header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=Q9+Bmru0;
	arc=none smtp.remote-ip=220.197.31.4
X-Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4617A606A332
	for <netdev@vger.kernel.org>; Wed, 25 Nov 2026 09:57:59 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4617A606A332
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;
	s=s110527; h=From:To:Subject:Date:Message-ID:MIME-Version:
	Content-Type; bh=Nxu6L2hKXuOq/BQVilmRWHy36RXgS3d5UsMYxm7Wdek=;
	b=Q9+Bmru0YMgmbi7CkDjC/uNCMW316zFqrdfOT1ZvIcFBZPu50IyWAyLPt6bs+3
	gA9vp9W2FwCCl0z17veFW3IWYot3ZBwQTMl+bazGxn240hFzE3xBlb+NdMfGg4Mx
	mToVTCro/UMyfCfOFrNTeaesYTgXVntW15SGjNuopHWtI=
X-Received: from ck.. (unknown [])
	by gzsmtp1 (Coremail) with SMTP id PCgvCgDXH4XosAZrhTDbHA--.53977S2;
	Wed, 25 Nov 2026 17:56:57 +0800 (CST)
X-Cc: Frank.Sae@motor-comm.com,
	netdev@vger.kernel.org,
	andrew@lunn.ch,
	hkallweit1@gmail.com,
	linux@armlinux.org.uk,
	davem@davemloft.net,
	edumazet@google.com,
	kuba@kernel.org,
	pabeni@redhat.com,
	mjkchengke@163.com
X-Mailer: git-send-email 2.43.0
X-In-Reply-To: <179559859720.3294.18444813646422214701@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-CM-TRANSID: PCgvCgDXH4XosAZrhTDbHA--.53977S2
X-Coremail-Antispam: 1Uf129KBjvJXoW7uryDKFy3Ar4Dtr1UKFW5trb_yoW8Cr4UpF
	WayF1vqr4ktF1Iva9rtr4UAasagrnxAr47Wr1UXryDA3Z8Gr18tFsIgF1qqa18Kr4vqay7
	tw47uryDA3Z8ZaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2
	9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0JUtPEhUUUUU=
X-CM-SenderInfo: ppmnux5hqjyvi6rwjhhfrp/xtbC1AnCEWsGsOnk6wAA31