Article View: linux.kernel.netdev
Article #9226Re: [PATCH net v2] net: usb: lan78xx: let unregister_netdev() stop phylink
From: YuanZhe Liu
Date: Sun, 01 Nov 2026 05:26
Date: Sun, 01 Nov 2026 05:26
36 lines
10559 bytes
10559 bytes
Hi Andrew, Yes, I did, but it ended up at the bottom of my reply to the sashiko-bot review, which was not the right place for it. Here it is directly. e110bc825897 is the commit that introduced the call which warns. Before it, lan78xx_disconnect() did: unregister_netdev(net); ... phydev = net->phydev; phy_disconnect(net->phydev); and phy_stop() only existed in lan78xx_stop(), guarded by "if (net->phydev)". So disconnect never called phy_stop() on a PHY that had not been started, and the warning was not reachable from this path. e110bc825897 converted the driver to phylink: it moved unregister_netdev() after the phylink teardown and added an unconditional phylink_stop() before phylink_disconnect_phy(). Since phylink_stop() reaches phy_stop(), which warns unless the PHY is at least PHY_UP, unplugging before ifup started producing "called from state READY". git log -S'phylink_stop(dev->phylink)' -- drivers/net/usb/lan78xx.c returns e110bc825897 and nothing else apart from my own change, so that line has not been touched since it was added. This is also why v2 puts unregister_netdev() back in front: it restores the pre-conversion ordering, so an interface that was never started is not stopped at all, and a running one is stopped by lan78xx_stop(). Thanks, YuanZhe
Technical Details
Message-ID:
<179351078879.2591.15287457752530436149@stu.xidian.edu.cn>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-354177-linux-kernel-netdev=dewy.ruReferences:
<20261031165213.2738-1-25031212351@stu.xidian.edu.cn> <e71cccdf-59e5-407c-b536-9dd47a49b0a7@lunn.ch>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-354177-linux-kernel-netdev=dewy.ru From: 25031212351@stu.xidian.edu.cn (YuanZhe Liu) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2] net: usb: lan78xx: let unregister_netdev() stop phylink Date: Sun, 01 Nov 2026 13:26:28 +0800 Organization: Usenet Network Message-ID: <179351078879.2591.15287457752530436149@stu.xidian.edu.cn> References: <20261031165213.2738-1-25031212351@stu.xidian.edu.cn> <e71cccdf-59e5-407c-b536-9dd47a49b0a7@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="2628375"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:lZd9NLVFgZNk6vVbES8IfvibL90= sha256:FLdsYScKY3uJEvdyCHoJWBrpBcxA9x5e/cGh64V0F9E= sha1:b7GkavsmJZwpIAadjuVwH7JcGE0= sha256:nO/hHGc9CvOVTiZ5lvo7a5iSapXGuWY9Ff9rtRNUqW4= 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 DF3041122D3; Sun, 1 Nov 2026 08:27:33 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.417 X-Spam-Status: No, score=-2.417 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FROM_LOCAL_DIGITS=0.001, FROM_LOCAL_HEX=0.331, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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=neutral reason="invalid (public key: not available)" header.d=stu.xidian.edu.cn 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 LeCpuoa51naQ; Sun, 1 Nov 2026 08:27:23 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-354177-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=stu.xidian.edu.cn X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 142F21117A2; Sun, 1 Nov 2026 08:27:11 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 0D5602308A; Sun, 1 Nov 2026 05:27:08 +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=1793510827; b=yDV6iulleuil8lnTklVkWfo4teDkI/I0W0utirhy1q0HOG2thyiBvbEPv4FgtP/rWXvZ aekQjhV2XyGa0leK5YZSuDGD8XoeUFp6c3IPU2AvLLIYEPreTLgFUgl6c+DQxnYJnTcym m2uNJpG/l4pHSWQUXToqIGKNwF8ZN3TQclj2XJz3hM7A9LS+Xf+5YNNC6OgYe4eiwdFLg G9cHRYFzogi4pCJRP9TwLpeu2Y7vZwYpB/v/v5eBgkpGEmrKdp5F4gHFnH6jgrAmz0KTF z50yiv7ZpKfRSg9gryX93b/d+riXm2RRFez/96bR8ptFUtoa7SwrY4Q6sWSh4FY8eyQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793510827; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To: Cc:Subject:Date:Message-ID:In-Reply-To:References:Content-Type: Content-Transfer-Encoding:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: X-CM-TRANSID:X-Coremail-Antispam:X-CM-SenderInfo; bh=gM3q15/BMiP6EHVsNFcvdv86I1H+gIVZ8AKY9O890iw=; b=NIUMjNTrfObEfXNvU2LnI37AC9YFhOFppcmOuIhOFaYgZbEsqTEFenvHKUyIa9ACyYE5 A82tuzhhVrSk/+Ft3rB5ODZtBf3Wct5X0VbodMbxBh7tB877ofzG7rqYLRUAxnDetKd4d n2urClZP75JF207HyDoV531OqYvDox2x5XnZJWHS8mNugTbv9nEOFP3Uk3I6mN7DKecUt 1zVLTFVzTK3o9Sg/0bTFxIrTWqyfIiO1rXTrAkkMFQ5QLjsYJBgUK3f7LZZkYUsUJ955e ktgygj3x3lZKlkz7wh9l6AnzO4psrKZ0O6YFMnEY91ieS6oRBHb7PM/ZWUOfALKpDbA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=stu.xidian.edu.cn; spf=pass smtp.mailfrom=stu.xidian.edu.cn; 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 6C462606A32F; Sun, 1 Nov 2026 05:27:07 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=162.243.164.118 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793510811; b=A6GbFFzt0iASjrmfLihhZ4ss3hfnNqWU0V0YvYDl0AwceGnboS9WJoLPhdvIzZgtunTe CU91k8xdpqd6pwTgiShm7AsIN8UgTbHqLyFmJrnHFI6ADBJJD9/ZMPo9p1+LYS5zf/fey lfsXCT5jfBj5Pdmpo4VU6yAupMqz3BHZ5cSW+emsgE20hBr2p5pSvxOWYNqxnhduxYpxn VXPPB/STHKsBp2Wwl+uPAC2XjqxgtCypQWC6aDyXHBi2oMZ+HzZwP3bZsLcGI5Bcbka6g /1LOvwQTpja9hqHWlpmocJXJmfUlRjpPFYfF2XiJ1qrncZQVhsYlRCYy/7w2L/ya1hQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793510811; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:Content-Type: Content-Transfer-Encoding:MIME-Version:X-CM-TRANSID: X-Coremail-Antispam:X-CM-SenderInfo; bh=gM3q15/BMiP6EHVsNFcvdv86I1H+gIVZ8AKY9O890iw=; b=tXNEh88p+GWeX3CCex0d5lr7KsLEDfa86YibOQSZKz3OzWdho0OvslidN0iVdxXCeuyK EwCxWAsbpKaDNiX035Zh0eHeAnUXcSKUsbZquslIr3/cMH/kXdcek1yerl+zt7qluoQah cWyFJ3RKwYyrLQweRuoBAB1/FcQdTEBer7Y5zCD9ezDmFIXkTpHvmb2rk29vbhM3z6Pit Jr0pR6JH61q8TZ9r2G0oOOZMCTS1j8JYmsDfpmgJ3BXWL0u8vL9hNV/FI+52ndow9maNa YPR3cKWgcgHHwECxMXyydVJ+YR7b74KhW3wX8A6NVUPDo7hpbTIjAlLAqe2A9+sAOQA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=stu.xidian.edu.cn; spf=pass smtp.mailfrom=stu.xidian.edu.cn; arc=none smtp.remote-ip=162.243.164.118 X-Received: from zg8tmtyylji0my4xnjqumte4.icoremail.net (zg8tmtyylji0my4xnjqumte4.icoremail.net [162.243.164.118]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D590606A324; Sun, 1 Nov 2026 05:26:45 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6D590606A324 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=stu.xidian.edu.cn X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=stu.xidian.edu.cn X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stu.xidian.edu.cn; s=dkim; h=Received:From:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=gM3q15/BMiP6EHVsNFcvd v86I1H+gIVZ8AKY9O890iw=; b=DcTmpEt6tu5MPIYYUmzCQvTDZfthEoxo2ZpI8 5oir9rrGWoNToWurvWVNwEHj68b2fO49plEFm06tsK1eBQSEp8w5vbFJAzpvvYq5 GO03IoZaqsQMupFzAc05qgb3jOj/TFbGiOSvCnEOS2+l7XVIFEU0l+SIczKEfSPx zWHv6E= X-Received: from [127.0.1.1] (unknown [113.200.174.23]) by hzbj-edu-front-4.icoremail.net (Coremail) with UTF8SMTPA id BrQMCkD2FPuEzeZq_Z0UAQ--.15833S2; Sun, 01 Nov 2026 13:26:30 +0800 (CST) X-Cc: Thangaraj Samynathan <Thangaraj.S@microchip.com>, UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King <linux@armlinux.org.uk>, Oleksij Rempel <o.rempel@pengutronix.de>, stable@vger.kernel.org, Bin Yu <byu@xidian.edu.cn>, Cheng Wen <wencheng@xidian.edu.cn> X-In-Reply-To: <e71cccdf-59e5-407c-b536-9dd47a49b0a7@lunn.ch> 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: BrQMCkD2FPuEzeZq_Z0UAQ--.15833S2 X-Coremail-Antispam: 1UD129KBjvJXoW7uw4UCFWktr1UGF4xGr4UArb_yoW8Jw45pa s8ta97Wr4vyw1S93s5ZF1UZw15AFnrZrW3Cr90grWrX345try7Jw40qFykZF1akrsxA342 vr13CayUuFZ5J3Dan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