From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) 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 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-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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