🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #8866

Re: [PATCH net v3 1/4] net: phy: as21xxx: handle stale link status during autoneg

#8866
From: netdev-bot+sashiko
Date: Fri, 30 Oct 2026 10:32
41 lines
9239 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: as21xxx: handle stale link
  status during autoneg" says "MDIO_STAT1_ANEGCOMPLETE may be cleared…

--

net: phy: as21xxx: handle stale link status during autoneg

The patch makes as21xxx_read_link() record whether autonegotiation has
completed. If autoneg is enabled but not yet complete, it forces
phydev->link down, so a stale link up bit cannot be reported with an
unknown speed.

> When autonegotiation is restarted, MDIO_STAT1_ANEGCOMPLETE may be
> cleared before MDIO_STAT1_LSTATUS. In this case, the link status bit
> may still indicate link up even though autonegotiation has not
> completed.

[Severity: Low]
This isn't a bug, but MDIO_STAT1_ANEGCOMPLETE doesn't seem to exist
anywhere in the tree.

The code in as21xxx_read_link() tests a different macro:

    phydev->autoneg_complete = !!(status & MDIO_AN_STAT1_COMPLETE);

That macro is defined in include/uapi/linux/mdio.h:

    #define MDIO_AN_STAT1_COMPLETE		BMSR_ANEGCOMPLETE

Could the commit message say MDIO_AN_STAT1_COMPLETE instead, so it matches
the code and the name can be found with grep?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261028073024.25175-1-ansuelsmth%40gmail.com
Technical Details
Message-ID: <179335632023.3134.1234553586034910370@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353714-linux-kernel-netdev=dewy.ru
References: <20261028073024.25175-2-ansuelsmth@gmail.com>

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-353714-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v3 1/4] net: phy: as21xxx: handle stale link status
 during autoneg
Date: Fri, 30 Oct 2026 10:32:00 +0000
Organization: Usenet Network
Message-ID: <179335632023.3134.1234553586034910370@kernel.org>
References: <20261028073024.25175-2-ansuelsmth@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2212299"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:UhOJMGvHN2J6HrnMdZGEzuEmgNI= sha256:+ZBgNOQrzgXTZnj+rKM0/edhXXbZPEFqejBoA6Bedww=
	sha1:/SyUEMYSXdJ1VsUAJa0DexUqklI= sha256:sd25TuELZuHa3ZuX77g7erdQ7lsuyEIqB2n6eEdQxt0=
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 8BCAB125C91; Fri, 30 Oct 2026 13:32:30 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.5
X-Spam-Status: No, score=-3.5 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.001, 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 SM1WjGIYlP-J;
	Fri, 30 Oct 2026 13:32:23 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-353714-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 19631125C90; Fri, 30 Oct 2026 13:32:12 +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 4C787600ECE; Fri, 30 Oct 2026 10:32:09 +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=1793356328;
	b=ygsPUer6dYb9WJa/AC0ddVSGDihYEcTU23qS96wtfpRUybuU/CeEvVAaF6iQG2OuzePZ
	 ielyTI61E7v9fqIW+nqqJDYwKqW9v87ItOPWdjAq929WXOm2ATy28A1FTYzW5l9ZBVJm/
	 WXkNtTFeE0Fi4hO2jCnqr6/cV+Z/bhiswVrWJnshjzDgktRE8EH6DTKo7T5jGz6J7Xe8d
	 u2Owrg2/8NrRNyZh5lK8zyK52LKEAmJ7cb35F5Cqv0Ja+pVPEATv1caE15tBIxO9Prxwg
	 EtMMOO+tTsDdMydkKuo4ah8TBcWHLDjTkt3cO2wy4rnthFngVS9jD18yh+jFk6NpwYw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793356328;
	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=2iiS+eMb7XAlieAPmXHMABznip3XUipzmcOi5i9z2Ko=;
	b=pN/A7mqElv/tMnZZmKmkbEzhmi/qKar/CZ75N/PU5EQyHR6ETdxJ/lp9LVODrIT1Td+9
	 Nw/zhX9PxzdbyhplTjqPcNuc+KgXQPxKmhp4UqDFpuQ385AKTLGYEXbKv5SccDgOvt1DD
	 jI3uqP1Yc9xOY1uD6R4HA40hfNX6sAcEJrrYFyiKK44NSYcH+MS/TmoSBy8V/LDvQaTdr
	 hrEGPEwaBbw06ovDceOlP4UGtPCWSKzRJm1kmm2idBC641ibsD2kYIQ+oiqDMbDIT5Q62
	 39+4u/4PzXmgH4IRzpZ5iacE8OSJKfsvh5xYcRxmIA2RRZDdk1lYWmnujz22kxt5SeA==
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=Anc6two2;
	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 DDFF7606A32F;
	Fri, 30 Oct 2026 10:32:07 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Anc6two2
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=1793356322;
	b=BHRBbwe+bJhgv1IVsJTq2WHQlZx8ASCPZaZL8bYKvtnFl8dD0Pv4YhpmXfWfcW165NpV
	 vG3ENMY0LK15HYE3qjAewixrOQaWjA9YE7WrlR+/NjUUM6h9+uGE2yjexR7GbDznk1fAW
	 vbThZvQFnzwCO0hevGxOWtKK7Dr0JMnu7LOSgSytHHRvXsg9RppoAT3jnw1bXq75tcSPM
	 xevogIKRF5dfqnrsZKmBxqpTMDXos19axc0y5AYEitFP9YSlVoMuErmkDqCZEBuXZg8Zz
	 1C7F5OEIi0OZm2V98kROGgg7KWwGGLGjLt+KTbXhCxXgkjV8b65veweF2o0gJFdIWQA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793356322;
	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=2iiS+eMb7XAlieAPmXHMABznip3XUipzmcOi5i9z2Ko=;
	b=qMNvyHumh6zJ7u3VLaPVhRdhkS3sKNekP1x0j5xwMdkvMPLqnhuxcG5kbcVC7zfygeue
	 C7kJnPntBdzKlRRepRsOt7+lwr0UPFfqv8dOR8ExqEpTkxdGHji/+66hNXYeVEY6FTltB
	 9xuC0jCX7aYSXydGyxwa7AlpbXmejpj6l87ht9DDceK5tL/wDuSke32vImwqAvBZv8ux+
	 nddJu5buq89i+ABtMn7wA1jKdmeVwikO6w9FLBGBdtLLGagLn2Fo/zYydoc+Wtnp98TRG
	 881ZNmqHPdIRUbWJoS1YmwIjaz8lPQYE8cUJpKP42+2VgNgzgJoGV7wMOFZZhrS6Fww==
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=Anc6two2;
	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) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95EFF606A31C;
	Fri, 30 Oct 2026 10:32:01 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB05C1F0093A;
	Fri, 30 Oct 2026 10:32:00 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1793356321;
	bh=2iiS+eMb7XAlieAPmXHMABznip3XUipzmcOi5i9z2Ko=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=Anc6two2Ae0LK2XAZ4qzVthOsNyBzSR/Ht2s7VHbhIweM1kGf5uZulAxnxzSmelrM
	 RqpUB2lT/BvvWVfXhsVu8+Uwxyr1ENrmd7vJZQLotGAcnZqDTmknSBlWyFec+if0yO
	 UDVL1cIUeWM3K8r3FDw0THh42wPAnm/0AaLSmx+SVIFdxgVRP0jAns1T9huNGagA4/
	 JPxBp2prbGEk6IeBd6aiachtSRakPk54eHDvbdpYZJ+5LEYwuYfdQzPoPtM4fIDLYD
	 7ZyqbPSPMztHForTley5bgqcRJCPDF+hK9TAlU+uoowcPy0C65/StPv9i4XB4ylLlk
	 IqTUXxTnz14eQ==
X-Cc: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk,
 davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
 netdev@vger.kernel.org, linux-kernel@vger.kernel.org
X-In-Reply-To: <20261028073024.25175-2-ansuelsmth@gmail.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