🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26645

Re: [PATCH net-next 2/3] net: phy: broadcom: Wire-up cable tests for BCM54210E

#26645
From: netdev-bot+sashiko
Date: Fri, 04 Dec 2026 01:29
62 lines
10345 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message for "net: phy: broadcom: Wire-up cable tests
  for BCM54210E" is cut off and leaves out what the patch actually…

--

net: phy: broadcom: Wire-up cable tests for BCM54210E

This commit enables cable diagnostics on the BCM54210E PHY. It sets
PHY_POLL_CABLE_TEST and adds bcm54xx_cable_test_start() and
bcm54xx_cable_test_get_status(). These wrappers turn off auto power-down
while the ECD test runs and restore it afterwards.

> Wire up the cable diagnostics now that we have implemented the cable
> test feature, this was verified with a Raspberry Pi 4B using a BCM54210E
> PHY:
>
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>

[Severity: Low]

This isn't a bug, but the commit message looks cut off. It ends with
"using a BCM54210E PHY:" and then goes straight to the Signed-off-by. Was
the verification output, for example the ethtool --cable-test results,
meant to go after that colon?

The message also says the patch only wires up existing helpers. It
actually adds two wrappers in drivers/net/phy/broadcom.c that change the
PHY power management state during the test.

bcm54xx_cable_test_start() clears BCM54XX_SHD_APD_EN before it starts ECD:

	/* The ECD run never finishes on a line without energy while auto
	 * power-down is enabled.
	 */
	val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_APD);
	...
	ret = bcm_phy_write_shadow(phydev, BCM54XX_SHD_APD,
				   val & ~BCM54XX_SHD_APD_EN);

The SCR3 and APD shadow registers are then rewritten through
bcm54xx_adjust_rxrefclk() in two places:

  - in bcm54xx_cable_test_start(), when bcm_phy_cable_test_start() fails
  - in bcm54xx_cable_test_get_status(), once the test finishes

Could the commit message describe this auto power-down workaround and the
reason for it? Right now the code comment is the only record of it.

Also, PHY_ID_MATCH_MODEL(PHY_ID_BCM54210E) masks the revision nibble. That
means cable test is enabled for every PHY matching this model ID. This
includes the Raspberry Pi 4B PHY, which is usually called a BCM54213PE.
Could the message say so?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261203004802.85707-1-florian.fainelli%40broadcom.com
Technical Details
Message-ID: <179634776778.3146.8896083681114965544@kernel.org>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376952-linux-kernel-netdev=dewy.ru
References: <20261203004802.85707-3-florian.fainelli@broadcom.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376952-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 2/3] net: phy: broadcom: Wire-up cable tests for
 BCM54210E
Date: Fri, 04 Dec 2026 01:29:27 +0000
Organization: Usenet Network
Message-ID: <179634776778.3146.8896083681114965544@kernel.org>
References: <20261203004802.85707-3-florian.fainelli@broadcom.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2647494"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ciqNBpFxlPcfjyl4eEgpOtW+wOM= sha256:u5MPLDYNIDsIxpobrkKWpTQVAXCR/BhsR0sgYbyxKxw=
	sha1:ap9B6vf3lUOH11vig6L5k+kDFFc= sha256:nM75gPSmmUQ4MAY7zSqI6BtAhRvyopaerRKPZ2b4wdE=
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 45C1E117AA1; Fri,  4 Dec 2026 04:29:46 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.639
X-Spam-Status: No, score=-3.639 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	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 (2048-bit key)
	header.d=kernel.org
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 FARC65v3VaOQ;
	Fri,  4 Dec 2026 04:29:43 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-376952-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 0C989114472; Fri,  4 Dec 2026 04:29:34 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 880AC21EEB; Fri,  4 Dec 2026 01:29:32 +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=1796347770;
	b=tmbS3/ZuGdDT1uLMkuGbUWuWUzjVsuSld6vcaHGWWigfxtM2mj4cUIz0ptmbPuZuzZRU
	 tRfpd15R5uaq+bHeBs7FQcuNdciCzt2qssZeF4PkIAKeNBMWHdsX+YF1t1r+WRxrgKNsh
	 jzt7H+7Zq543315FF8pYuNIIl4DUnJ/KDVI4Mzu/hx9ARK32ZxP/GFVnIoso3AYkw+ryw
	 3BuHhenO0p0hQ68cugdaRZZYX96WvqRJag5RQpM1N9/ZXArKAEnWfl8IkLbKeKnndrBQp
	 rYZso/JvxKY8xtiRtFcQfwPE4wFWA7KchdQ9DlpELCiQlt2p4phVhG5rzXQFUsvlw1g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796347770;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=RjW+HEX01jEhngdQmNZEyPVy0ux6z3XjpSLrOOaRZ/s=;
	b=HOSvCJEHod2956+MCgBnQwSoyALkEwAanJFrwN4hIf695X1TJ1EAn2aHIFceCrT+zYIS
	 dDRT5+0li1+4wi+hpL6rzlbYhAB5hNdGXr61skp57YqEQVQTqy+6tFXbP+P4qfC2FjIEx
	 LIZHmAfc6/7TFLPpV2XCUc4KW6KPj4Q+WHTfkr+WH1/gtGSsaJjq6YSyuXpQ78TdQph8n
	 WCoVpVNDWo+Hp9kEaRM+4dC8wLuHdugdjdon+3WHbcNCJJrCu9dn9VqA9GfZNpfYucYr8
	 IVGdGGhU6r3U5BI94WyFe6QJyqKg/z6ukYebxqoA/m2cfXiWbnB0pJXrcZsJDcQqoXQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GBuhouDb;
	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 0983C606A33E;
	Fri,  4 Dec 2026 01:29:30 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GBuhouDb
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796347769;
	b=Ja5K32fdd09g/oBbXqwP0VtEdcv9rI2Fy+bOJqwfZSexo8ZGotV7Pb37G8ruuN2igxxP
	 RxhwnKUO0lFzlD4/hLhL7z8w70koAfW/A1zofGWt2F7C3RMe4DzE9eeJLNqzqDq7MJr0R
	 AczAt9bwEjzC1SY3pgRtmLge5PPAbprSMHeTRo+ftke2yySjLqL/V/DQA4shgwGEW9X3B
	 YpyL5nqdHP6Y9BPuMV+3J14Ag5+L0IAnruCqE8TB7NFFM1Oilvg9suGe9iy9HIra0NjER
	 Hp0Oc1wpa5wwSrj7Dtm3L3Zy51ye4xVbqAouS5baBAQEWNM4uPm9rmzoUxwF99Es6kA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796347769;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=RjW+HEX01jEhngdQmNZEyPVy0ux6z3XjpSLrOOaRZ/s=;
	b=nRMonajn0G+UmgGrcKtHD7OjSV/E3eIlkPipchdsgbgE2FGflA9FD0ZY2IjZuHs46K6D
	 jcV/eO9K7ZZRHJL0/Bs/HVhM6yXt7WvwrZ/nONiHn28ByTyPaE7Hz5FvQA5L29ZxRMuVS
	 cEE6gB6J0swzkW6vSEvrYChbUiFPiVMyPetSl6eAz6t/Fg4Q01KLHdbxnlrJXsrBwUtZc
	 +JHcwtCzInEJwSWddhfBqQIZaoFfk97t91ilwVqYAoQvl0pTp/olpUSWOhNp1gdSQGVd3
	 5ayn9AZ4hWBTNVHKIKdbHEv1d4a+pqCv5Ili6phzxQKA1gJBy0Tof9VKaU5cu9JPR2w==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GBuhouDb;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 28B7F606A339
	for <netdev@vger.kernel.org>; Fri,  4 Dec 2026 01:29:28 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34CB11F00897;
	Fri,  4 Dec 2026 01:29:28 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796347768;
	bh=RjW+HEX01jEhngdQmNZEyPVy0ux6z3XjpSLrOOaRZ/s=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=GBuhouDb+lY7meajnpNqhcWwd5yLFJ9iUWFb4qcGljtf+8Txx9pdlWKPPDL3OQ0Wn
	 Peg5Q3huoDJDHcUhqt+VKSv4sFQh3T3TlTjgF8NesBd1tK5V35bkIvvuWz96t5gRkv
	 nbzT3FiD7LCSoiPrFE7dQCEXS6prdWL5LpSWHp0cZcw5YYyoRMltHAOsQzNnkDCtQ3
	 33yD7sJ+NeSm7ilnWzR7m48JtfguzWbL0puN7+GnYhspfdxriu699Gj7K39zYGmtOS
	 9CmTge5XQdza3MKGUoZRG0luWMP+ch1HoCHYWmX5oUte2eaaavDi0tfajQZCKhZpRL
	 L+0oPdDyBf9IA==
X-Cc: netdev@vger.kernel.org, nb@tipi-net.de, f.fainelli@gmail.com,
 bcm-kernel-feedback-list@broadcom.com, andrew@lunn.ch, hkallweit1@gmail.com,
 linux@armlinux.org.uk, davem@davemloft.net, edumazet@kernel.org,
 kuba@kernel.org, pabeni@redhat.com
X-In-Reply-To: <20261203004802.85707-3-florian.fainelli@broadcom.com>
X-sashiko-severity: Low
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