Article View: linux.kernel.netdev
Article #26574Re: [PATCH net v10 4/5] net: phy: run a postponed PHY interrupt handler directly on resume
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 20:31
Date: Thu, 03 Dec 2026 20:31
72 lines
11132 bytes
11132 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] In mdio_bus_phy_resume_irq() (drivers/net/phy/phy_device.c), the
comment "A nested threaded line has no thread; we run the handler"โฆ
--
net: phy: run a postponed PHY interrupt handler directly on resume
When a PHY interrupt was postponed during suspend, the resume path used to
rerun it with irq_wake_thread(). This patch replaces that with a direct
call to the PHY driver's handle_interrupt() from mdio_bus_phy_resume_irq(),
made only when the PHY still has its interrupt requested. A new
irq_requested flag, protected by irq_pm_lock, tracks whether the interrupt
is requested.
> diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> index 2d2058c29f300..16b398794486f 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -355,12 +355,19 @@ static __maybe_unused void mdio_bus_phy_resume_irq(struct phy_device *phydev)
[ ... ]
> if (phydev->irq_rerun) {
> phydev->irq_rerun = false;
> enable_irq(phydev->irq_rerun_line);
> - if (phydev->irq == phydev->irq_rerun_line)
> - irq_wake_thread(phydev->irq, phydev);
> + /* A nested threaded line has no thread; we run the handler */
> + if (phydev->irq == phydev->irq_rerun_line &&
> + phydev->irq_requested) {
> + mutex_lock(&phydev->lock);
> + phydev->drv->handle_interrupt(phydev);
> + mutex_unlock(&phydev->lock);
> + }
[Severity: Low]
This isn't a bug, but could this comment be reworded? It reads as if
the direct call only happens for nested threaded lines. The only
conditions are:
phydev->irq == phydev->irq_rerun_line && phydev->irq_requested
so irq_wake_thread() is now dropped for every line type. A normal
threaded PHY line, which used to rerun in its IRQ thread, now also
runs handle_interrupt() inline in the PM resume callback. It does so
with irq_pm_lock and phydev->lock held, and the irqreturn_t is
discarded.
The commit message covers the general change. The worry is that a
reader or backporter takes the in-code comment as the condition for
the call, when it is really the reason the thread wake was dropped.
Something like "Run the handler directly, since a nested threaded
line has no thread to wake" might be clearer.
One related side effect: on a level-triggered line that is still
asserted, enable_irq() can wake the IRQ thread while this direct
call also runs. Both paths take phydev->lock, so the second run
should just find no pending status and return IRQ_NONE.
> }
> mutex_unlock(&phydev->irq_pm_lock);
> }
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202-b4-phylib-mac-pm-irq-v3-v10-0-2f938d473f17%40iav.lv
Technical Details
Message-ID:
<179632987638.3146.11819698658112682145@kernel.org>Path:
mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376849-linux-kernel-netdev=dewy.ruReferences:
<20261202-b4-phylib-mac-pm-irq-v3-v10-4-2f938d473f17@iav.lv>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376849-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v10 4/5] net: phy: run a postponed PHY interrupt handler directly on resume Date: Thu, 03 Dec 2026 20:31:16 +0000 Organization: Usenet Network Message-ID: <179632987638.3146.11819698658112682145@kernel.org> References: <20261202-b4-phylib-mac-pm-irq-v3-v10-4-2f938d473f17@iav.lv> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2588237"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:JNLcAErCvB4RyIszV7Ng3bQ8qgU= sha256:qhrIJjB+4I7eDHAOpViWk83EORi9Gi0q4n0q4ykKULw= sha1:iXXWcDaOa8VvCbr/ojIjIH4bFsA= sha256:Yx6xO0fuIMRloxpBe/nMgyg6kMRFApummUFqYHWdJOQ= 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 DE1C7117A29; Thu, 3 Dec 2026 23:31:36 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.74 X-Spam-Status: No, score=-3.74 tagged_above=-9999 required=6.31 tests=[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] 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 WqeYEiPIkh6w; Thu, 3 Dec 2026 23:31:30 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-376849-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 08A01117A28; Thu, 3 Dec 2026 23:31:21 +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 07984601958; Thu, 3 Dec 2026 20:31:20 +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=1796329879; b=Kz3nAPfeBMO4JnGVp21Tt3A1TM1mdmNE2H3shUGsKTAglWZA6GeAGc4cxksfvHcG8aMb u22tRemE5hsPmRq5Uj3C6KwcgMNZgvVtucdYmXie+msSRJqVQWPd/oARSA12mMYaiP58O CanftVtmN0l5IdGuPrFgYhqE7SjSdeJXBr6lDTRp/bXDQRQI8NbEivoouHfB2vvf+Kz1e P01XFYf+y/pOeDoHvwmKH/Pgqb2yrsF1okbCqd7GTVexgf9hEDisIZnulvSzyl2R1R2ay APq9OQ+4HUSTxQXc4WDDrGLp2gxfNK0lnbdbMkR0JOZO1TzBi+hRn/07rjAYVGGR9Zg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796329879; 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=Qxgn0cPJMdfDFyvhvrOGRRIDmLAVisVvS6N5Tmvinj0=; b=Ulvh2Um2XyI66PCwLK47H5p9CmfBgSRnqRMZmp1E+JnVxTm19xt04fCYr1VGdX8WtHta rvfdtUdrVPmuzQlzZsppnbmQsImaRuZhsSF9EPMRJUNRd2FyfavBTOopY2iZcpagKYuln XhuApqJ48jGf+rcMwRuJT/qfbDWkS7zLEp7IAjAkL4GZBMwvY9Icpw8fTyM43CW7kGxWp 9m7gxNVe9rx22REAhZfQfkw8wknNxFJCnAWYhqotKDLPpobHab9w6BZhxsm3YnqLsrsd+ S1MZDqb/ZEL0K6DaGFNQjji6l5jrBcXI5gM2FcKqyQSfvZ5s6WD3tlvfkW5p0lUgNCw== 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=ouJLADjQ; 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 7024D606A337; Thu, 3 Dec 2026 20:31:19 +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=ouJLADjQ 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=1796329878; b=l3BjoBcHzP5xK+1PDx1YFud5oc9MS/Y51adiXoRTGx/T5tbMbHJlayCyyV0hsFJ/2B5/ gRpFGzMQIJFWzn0142AyDY+Y5nlaCoMGxCxO+J9YbQ8aGVr6YX/in6b6HDJoPaPj0tdYv Qka2TXOGm2LEj7cevb1TG98OjsNZY0rVEXs8jVNBplrI4M4aJyZoHqkaXLS5mxJyJXImE e3Q7S6g0MveHAzzaMNbFLsxeL15P2ocilb4Ojv8YV9ABNdhzIVRyzu9TD4RUuuQIzvxAR gke5lsifWqAaJ0hBCWX2NFafEQO7aFmGG+UJ+gbV4sWeVryW3/8ubWV9a+8aCO7HE/w== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796329878; 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=Qxgn0cPJMdfDFyvhvrOGRRIDmLAVisVvS6N5Tmvinj0=; b=rwkeaHqEc2QSJE+6rngnZwjCZDFrgxXsIizQGZrrOR9LGlLj04mj7mpZf3kot7Fb/PDl speU11wtvyQjVLtBZpjGzuiw7RCtsrmlWpfRVPKEE7Vg92ankI2wsK1niNlbb69zW/xF5 SuIgrBhGBVoV3UATEpHwuDXIpzRXo4Cq+zfe4jeHFkDV0VTqhK2oY2zrlU5poX2fio9Ux pLKNbNGjYS5UaKj+ZquB4qYVruuvE891dE2pYG5Ux40txVGS3wX5buLPrOuFYwfeILi85 ZnG0MELlU/kVYcr0iKZWrTXq7jxdXdslYSPUQ72krTQjcZENoulVvL1QzvxltmNzeog== 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=ouJLADjQ; 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 8FA2A606A330; Thu, 3 Dec 2026 20:31:18 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC5AA1F000C2; Thu, 3 Dec 2026 20:31:16 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796329878; bh=Qxgn0cPJMdfDFyvhvrOGRRIDmLAVisVvS6N5Tmvinj0=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ouJLADjQaZSsjEriw3sKl9TDmYROJsOTpkemfUClwozafcxhsT2L/G+AwquREp1jl jMcCYgzbzjT1ZmBS8yITQ5g89s+oPaqTLyz+m1n0Kgq16BUVk9dzltHsabsHAhuSBZ NDUZffqGLkTPUaoQ/R5sbqQkq7+Mn8yW6EvFUHGz+Mq6fzy+K8Axdy/jOvy45e++Gi hn6KCJKud1xr1U3L+JUxREfcOqRgi8mZF6YRtzBLqs0OMqkKbUpWHKgGXCx/jkX7bR YeqfBzJ79f0Oq/lTa+OVMjbPnmmIDdzUBe803FrmzZ6QkLZZxyKMgGC1dhSNX+KlJw 9UciZYq2lNYvw== X-Cc: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, tglx@kernel.org, linux-pm@vger.kernel.org, maxime.chevallier@bootlin.com, lukas@wunner.de, rafael.j.wysocki@intel.com, wei.fang@nxp.com, niklas.soderlund@ragnatech.se, paul@pbarker.dev, florian.fainelli@broadcom.com, opendmb@gmail.com, Thangaraj.S@microchip.com, shenwei.wang@nxp.com, Haoning.CHENG@cn.bosch.com, willemb@google.com, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org X-In-Reply-To: <20261202-b4-phylib-mac-pm-irq-v3-v10-4-2f938d473f17@iav.lv> 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