From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=220.197.31.3 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795971061; b=QzYnPnTMcWalepwUGO/KgS/DCdKpv4f495jymrb66CYZraIOzpJyO4pvX/dvnKAThRO3 9q0fvMu25QQqliYExZYRBPiqeRH8BhDqm5MznCcGYZ/8qYHnZoWxWrE0dcIuyk+U1OnC5 GZtXtTxGu8vCoMvW7DoX77wIcxYpB71UtgWc2Pb+h/zmgiOSX4ER3gopcCQY6eX9ULkPy 0OZ5eI3kE5nC4aclRrVJJTq1/X9qIhCGijb9qh9EqaAwORALLAS5s3bW5IIk4g7vpMrrd cg6OszrA96BimpTD9I6CubefKDS79BHc+xKlv0/Mm9+vhmpmr2fNgkbQQtZV54A0N+A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795971061; h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-CM-TRANSID: X-Coremail-Antispam:X-Originating-IP:X-CM-SenderInfo; bh=X6jyDojLwotGY9Dg3Z3wRNYyVr/Dr0Hjqxqft5qnxQw=; b=catD0EAFkZtqrJOnNkwEyzrY87S1YBFWxmOSLr8zsNQ/8yh+/ud7Ep9QvGSC8AWJr+e+ tdOWoX56WGfrJTzB6BshXOdbioS0N3Vad/uZonlFaNNIQruQLvVJhucpLGqeEQqU1bEmz iW7cxghcu3ygzu+vjGcLPIjUMyldgYoInI35syYr+ehinL+17U6q5J04Z4CjO8taB84X+ mL/JIQgM+/9M9xhi4fqFvp6PlJDrdALlVI+QT3D1VEfMZR3YY1M33GTINkP9rKZgsPTAJ ZZxPmHHg4PzMsS4xGAzZBDCbectNlCdE0Z9RVYWZdjDDQZSEQPMUJ+U1GNIy1YbcByA== 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=kHPz2FOJ; arc=none smtp.remote-ip=220.197.31.3 Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.3]) (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 66F37606A31C for ; Sun, 29 Nov 2026 16:50:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 66F37606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=kHPz2FOJ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Message-ID:Date:MIME-Version:Subject:To:From: Content-Type; bh=X6jyDojLwotGY9Dg3Z3wRNYyVr/Dr0Hjqxqft5qnxQw=; b=kHPz2FOJHYL+p+zJ9n9HgiPNE95aJMwPp82mfcCT0hJu+jMeczedY0zj3CMDPv HTN3jSqjTQJhr4e1gV2BG7cfL4vGIR7Ws1pYsGuH9B4lngN/Ii35NOmZFNecL4Cm ihYBX6cjj5WkCcfpBdmM0Vhji9Y3bWRdNrfMYOxg7ILSg= Received: from [IPV6:240e:b8f:91b3:d000:2f3a:64db:294e:7919] (unknown []) by gzsmtp4 (Coremail) with SMTP id PygvCgCnj26hVwxrvyKnIw--.16649S2; Mon, 30 Nov 2026 00:49:37 +0800 (CST) Message-ID: Date: Mon, 30 Nov 2026 00:49:36 +0800 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net: phy: avoid synchronous module request in async probe context To: Andrew Lunn Cc: netdev-bot+sashiko@kernel.org, hkallweit1@gmail.com, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk, netdev@vger.kernel.org, Manivannan Sadhasivam , Bjorn Helgaas , Shawn Lin References: <20261124070753.25972-1-18255117159@163.com> <179559227928.3135.10596298102368144827@kernel.org> <0437f8be-41ca-4fb8-b775-ed02413ea16d@163.com> <24787f0c-e90e-45f1-a9f3-d0772fbafeaf@lunn.ch> <04208d88-5611-4b08-b4a3-4030d75fa946@lunn.ch> <7a5a6aa7-d521-4346-b2f2-d3548d726d9d@163.com> <07b98d3c-c1c0-461e-8e38-8cdd29794b50@lunn.ch> Content-Language: en-US From: Hans Zhang <18255117159@163.com> In-Reply-To: <07b98d3c-c1c0-461e-8e38-8cdd29794b50@lunn.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID:PygvCgCnj26hVwxrvyKnIw--.16649S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxuF47uw4DXrWDZF1xCr43trb_yoW5XrWxpa y3Wa43Zr4kKr4Ivws7C3W8ZFyFva1fGFW7uFW5W345Zw1aqFy0yr48GFW7ur17Wr4rC3W7 tF1Yva1UCan8Aw7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UYiihUUUUU= X-CM-SenderInfo: rpryjkyvrrlimvzbiqqrwthudrp/xtbC6wPbf2sMV6O40AAA33 On 11/30/26 00:34, Andrew Lunn wrote: >> The phylib change does exactly that: __mdiobus_register() returns >> -EPROBE_DEFER and lets the driver core's existing deferred-probe mechanism >> do the re-probe, rather than spawning any workqueue in phylib or the MAC >> drivers. For the corner cases you raised, I audited the mdiobus_register() >> callers and found three that fold -EPROBE_DEFER into a hard -ENXIO: >> lantiq_etop, smsc911x and smsc9420; the 4-patch series fixes those alongside >> the __mdiobus_register() defer. > > https://elixir.bootlin.com/linux/v7.3.4/source/arch/powerpc/platforms/pasemi/gpio_mdio.c#L244 > > The error message is no longer correct. > > https://elixir.bootlin.com/linux/v7.3.4/source/drivers/net/dsa/mv88e6xxx/chip.c#L3896 > > Same problem, > > https://elixir.bootlin.com/linux/v7.3.4/source/drivers/net/ethernet/altera/altera_tse_main.c#L158 > https://elixir.bootlin.com/linux/v7.3.4/source/drivers/net/ethernet/arc/emac_mdio.c#L173 > https://elixir.bootlin.com/linux/v7.3.4/source/drivers/net/ethernet/broadcom/bgmac-bcma-mdio.c#L236 > https://elixir.bootlin.com/linux/v7.3.4/source/drivers/net/ethernet/freescale/enetc/enetc_pf_common.c#L293 > > I will let you review all the calls to of_mdiobus_register(). Hi Andrew, Thanks, that's fair. I reviewed all the mdiobus_register(), of_mdiobus_register() and devm_mdiobus_register() callers, and the fallout from returning -EPROBE_DEFER splits into two classes: Correctness: callers that discard the error and fold it into a hard -ENXIO/-ENODEV. Only three do that (lantiq_etop, smsc911x, smsc9420), which are already in the series; the rest propagate the error. Logging: callers that dev_err()/netdev_err()/pr_err() on failure. They still propagate -EPROBE_DEFER, but the message becomes misleading and would spam on each defer. There are about fifty of these across net/dsa, net/mdio, net/ethernet, net/usb and a couple of arch callers, fixed by a mechanical dev_err() -> dev_err_probe(). Two of the links you posted (arc/emac_mdio.c and enetc's OF path) are already dev_err_probe() in the current tree; enetc's internal mdiobus_register() path still needs it. Note that class 2 already mishandles -EPROBE_DEFER today via the reset-GPIO dev_err_probe() path in __mdiobus_register(), so it is a pre-existing cleanup independent of this change. Would you prefer the whole thing as one series, or the core change (__mdiobus_register() defer plus the three correctness fixes) with a separate treewide dev_err_probe() cleanup series? Best regards, Hans