🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #3288

Re: [PATCH net v2] r8152: Use BMSR to detect the link state

#3288
From: Andrew Lunn
Date: Wed, 14 Oct 2026 16:10
21 lines
7317 bytes
> > For those devices which are broken, double read the BMSR.  The danger is,
> > somebody who quickly unplugs and replugs the cable is not going to get the
> > down notification. The dhcp client will not restart, so the old IP address will be
> > used, for the next hour to day, and the network is broken.
> 
> Could this actually happen? 
> I think it would take several seconds for the link to go down and then come back up.
> Wouldn't this issue occur only if the link transitions from up to down and back up before the driver processes the link-down event?

802.3 thinks this can happen, otherwise why make it latch?

If i'm just going from port 7 to port 8 of my switch, it might happen.

Or i reconfigure my managed switch to change the port from one subnet
to another subnet. The RJ45 is not moved, it is just a configuration
change. The switch should do a down/up on its side to indicate
something has changed, and that needs to be reported to userspace so
dhcpcd gets a new IP address.

       Andrew
Technical Details
Message-ID: <06aaa778-ad49-4e30-b1c6-a7dc68718a21@lunn.ch>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346337-linux-kernel-netdev=dewy.ru
References: <20261005105249.1281648-1-lilinmao@kylinos.cn> <fd3bff0e63304681b9e5f35f2f57e50e@realtek.com> <7a8d21bd-3484-4120-abd6-f7290f919b7d@lunn.ch> <2bd3886a-da6e-4703-bd7a-9baa32bfd2f4@kylinos.cn> <591ca604-b296-4469-94b5-957d9ba45ae4@lunn.ch> <16d9caec96e8449d88ac456e8512f08b@realtek.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-346337-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2] r8152: Use BMSR to detect the link state
Date: Wed, 14 Oct 2026 18:10:55 +0200
Organization: Usenet Network
Message-ID: <06aaa778-ad49-4e30-b1c6-a7dc68718a21@lunn.ch>
References: <20261005105249.1281648-1-lilinmao@kylinos.cn>
 <fd3bff0e63304681b9e5f35f2f57e50e@realtek.com>
 <7a8d21bd-3484-4120-abd6-f7290f919b7d@lunn.ch>
 <2bd3886a-da6e-4703-bd7a-9baa32bfd2f4@kylinos.cn>
 <591ca604-b296-4469-94b5-957d9ba45ae4@lunn.ch>
 <16d9caec96e8449d88ac456e8512f08b@realtek.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="2330552"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:CHxjiWmr2pj59fpAHU70jfSjj34= sha256:i+RdXhiiBPH0J34rTGZBTlOEV5EVEcPE5rBrpV4Olic=
	sha1:acCTR+hmmlh3zyDbyt/jEnNjj8M= sha256:NyYcLEql9ZQoSu7IkDeN88jen6xkVaAWPo+/+6Ufsy8=
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 DEA43110163; Wed, 14 Oct 2026 19:12:51 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.849
X-Spam-Status: No, score=-0.849 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1,
	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 vS8KeNzsrktd;
	Wed, 14 Oct 2026 19:12:43 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-346337-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id C8B7711006C; Wed, 14 Oct 2026 19:12:33 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sto.lore.kernel.org (Postfix) with ESMTP id ED10E60AA5D; Wed, 14 Oct 2026 16:11:24 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 02DCE3F7884;
	Wed, 14 Oct 2026 16:11:17 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="KrF+/Auw"
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id B83AC3F2100;
	Wed, 14 Oct 2026 16:11:13 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791994276; cv=none; b=is3nJGtnqph7BA67HU4ngowJSHoj4DirDwNaRG7+ziJC2JFW5RQSPM8nDMbNb4r0ZVuIGpVflcytnMQ4AvYGa4Xbz8V/bvxsoVHPXm4ojq/rZWRVjwN2krO8WF93g5kj+Rt2iBkLNchScCoPmNZMJo8Vt72sIWl1ZN9EyTinA/4=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791994276; c=relaxed/simple;
	bh=Xcxm0b+DqyH/3qMsa5XE2XcxHc50OQ0RC/55/HYpVxY=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=gisa6H6tYn6k4RhUMuNn0YtIDBVRV25EDIYolgNT9wTf5gNinD4/7rP3hE6fxszRC2rjsLE3mlhB57MNyumufAQfWMWI6vMDlhz4Av8Ux2+/gYrYApBHxAGAZRtXEmkaZU53yaSWRMiN1CSkOZpGf4Qzvtu6ZjouWbRTu7dGluU=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=KrF+/Auw; arc=none smtp.client-ip=156.67.10.101
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=ATveWh08eRUA1brkma7A3rEyXoH7sGRO7VGs5ZCBaUM=; b=KrF+/Auw5uql60aFJQ3SgTNHCQ
	IbYCxSzDKQDVgyTlDWJurCpJ+6knYhwH+xE4h7yOs/sVQfHLITlgFGzUW6P6y/CEbFHyiH47/PixC
	lwHrGHTNHqoud+td07EVeElT3FTyfRtU77A42/7aQBbgaQe51d4qbweLdpeH+tP8o2lQ=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xH1Z9-00AmBl-K9; Wed, 14 Oct 2026 18:10:55 +0200
X-Cc: Linmao Li <lilinmao@kylinos.cn>, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Chih Kai Hsu <hsu.chih.kai@realtek.com>,
	nic_swsd <nic_swsd@realtek.com>,
	Birger Koblitz <mail@birger-koblitz.de>,
	Xiangqian Zhang <zhangxiangqian@kylinos.cn>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <16d9caec96e8449d88ac456e8512f08b@realtek.com>