From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 60A9E606A32F for ; Thu, 3 Dec 2026 20:31:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=BTgs3U5H; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ouJLADjQ DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type:References:In-Reply-To:Message-ID:Date :Cc:To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=Qxgn0cPJMdfDFyvhvrOGRRIDmLAVisVvS6N5Tmvinj0=; b=BTgs3U5Hr/of0VvcsWkimxtWYk 1u2W7mQEEyjrekANdzP4qdN8uKavcmuIkl5ywH6+eeOgWe3QJN6+mT4tMIVSyNpvlxIQ6GgZyJdVC f3HAqXRzkDR2A6N6OyLwKX5BUQdgLT0AFlH9kEDLuB9qIcAZPRwhLuCq3RRhBtXDZGgUyT4aEcLIA v2OSkA9iVppWE4OPj9NUI6kNS6aGAnxHwf5YMJRRTcglpuDSA0GoJLbWZWfJ6D8MKcGN8k7Qfz0ke 7GmwLxTJfqBACNC10fQbsLb2wmKFmbTvmZlvdNS51X6Sb1VWo75JELA+OamqYqJQ8mjcit5C4C8lK Hmh9z3pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZDSd-0000000FwDq-0alv; Thu, 03 Dec 2026 20:31:23 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZDSZ-0000000FwD6-1gSU; Thu, 03 Dec 2026 20:31:21 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 77F1C60CD8; Thu, 3 Dec 2026 20:31:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC5AA1F000C2; Thu, 3 Dec 2026 20:31:16 +0000 (UTC) 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== Subject: Re: [PATCH net v10 4/5] net: phy: run a postponed PHY interrupt handler directly on resume From: netdev-bot+sashiko@kernel.org To: iav@iav.lv 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 Date: Thu, 03 Dec 2026 20:31:16 +0000 Message-ID: <179632987638.3146.11819698658112682145@kernel.org> In-Reply-To: <20261202-b4-phylib-mac-pm-irq-v3-v10-4-2f938d473f17@iav.lv> References: <20261202-b4-phylib-mac-pm-irq-v3-v10-4-2f938d473f17@iav.lv> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Archived-By: MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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