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=1796163645; b=LFJqpNo9CJHRi2rjVTyCWolQBnxvKodiIv0noDw61tLr5EaGBC6hEUqV/v3DyfwAa1Ho CljsOC/KGolTY8fM0SbJjtNSMD5591h8eSKz4Y9Oj/UzI3WvDEJQUEBaSI1/JvVKEuFSk z3VJiONpDFnQAKtS2D7F8awEVh1ZOK7x+jeuq9dv/03C0NBCIrULPk25ZADaNJ4Zub7Ui xFF/ORW2D+exZxlxR+yewezCfM2B3QH0fU2H41FW7pnI1xsa/uZ2mgw8xxzGfOOe5mOIq Y5uwZ+hyKjwpEi1u6gQ7erkxxLfKqzFbwwd0LXCphJGzfpVqaKOtxT0LChXi4dSs5xw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796163645; 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=3WekwQJ8dtQCQ+jyzGlDKj/BuZ5CX0HMswr9scOz5N0=; b=UPnMJ0TEko+6TRsLRGenw+cjgYMy+/Duk6Ny3eDPmh6gqp6CGQICG71ASM7VuicogA4q inrb+GuZs0kmNKeWWQFT7XT6p0Yae9t5H3eUWH0O3BAZpT20oANTLyhr5glYifOp6wdZD +0jkePjEz0bfaRXXiKNLUVLeoCdY0kS3DsxWrZ22svKGlSb2hMcA2wZXf9oMlIL6Gh+WT kuvXdj4rvah1VNEibzDxD9NE0FFMD3tzz2eJT+N3tDzweF1Q07s9PCeQhE/NMYW7tQ/NG +lHNFSXOLfSxD7EflUc2MNk/QZ4L466mT/p4hAqoHKgj2IfDl7jrqtf8kWLFH9OLRyQ== 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=TrFTX4Si; 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 42EC9606A31A; Tue, 1 Dec 2026 22:20:45 +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=TrFTX4Si Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C8591F000C1; Tue, 1 Dec 2026 22:20:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796163644; bh=3WekwQJ8dtQCQ+jyzGlDKj/BuZ5CX0HMswr9scOz5N0=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=TrFTX4Si7hto8znmwGa1+smNZxHX7F+0TeZfTc71lGC6RdVMCgNJ4tjGUlls4h9hf Ox9ffe3wSkIaG1aIRPQLrYiEKt4eblSNU1MkbIhCj/gkMtlgokmJVEjkXaUkPWJTjd bcalNWU3E+NTQGIy4LDJ3De54JyUAww/WaUdUywVm/FcJk1aDDzfny5WmXiaNSoU2J dlRoq89TRHytRNApeLjPaOhingglVVd/7OLZBevD2nTEFPallb9jfctiCNHWCoUG96 +GMrwCNLs45PdvG6wVl2NSUEewa4121WS7qpKXUaFgjcu9h0M+TYGc2ULejBLNhXzo Unp7T1f3IAtuw== Subject: Re: [PATCH net v6 7/7] igb: only allow runtime PM if the device can wake up From: netdev-bot+sashiko@kernel.org To: antonio@mandelbit.com Cc: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, janislacis06@gmail.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me, sriram.yagnaraman@ericsson.com, kurt@linutronix.de, maciej.fijalkowski@intel.com, hkallweit1@gmail.com, joe@dama.to, rafael@kernel.org, sven.auhagen@voleatech.de, netdev@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, stable@vger.kernel.org Date: Tue, 01 Dec 2026 22:20:43 +0000 Message-ID: <179616364306.3146.1188114987820092843@kernel.org> In-Reply-To: <20261130213740.3323814-8-antonio@mandelbit.com> References: <20261130213740.3323814-8-antonio@mandelbit.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 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] Two existing comments now leave out the wake-capability condition this patch added. -- igb: only allow runtime PM if the device can wake up This patch adds igb_schedule_runtime_suspend(), which only calls pm_schedule_suspend() when pci_dev_run_wake() is true. The watchdog task and igb_runtime_idle() now use it. A device that can't signal a wake-up from D3 is no longer runtime suspended. Closes: https://bugzilla.ipfire.org/show_bug.cgi?id=13562 > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c > index 79652ccbfdf00..bb1ef4320fb69 100644 > --- a/drivers/net/ethernet/intel/igb/igb_main.c > +++ b/drivers/net/ethernet/intel/igb/igb_main.c > @@ -5642,6 +5642,15 @@ static void igb_watchdog(struct timer_list *t) > schedule_work(&adapter->watchdog_task); > } > > +/* A device that can't wake up wouldn't notice the link coming back while > + * runtime suspended > + */ > +static void igb_schedule_runtime_suspend(struct igb_adapter *adapter) > +{ > + if (pci_dev_run_wake(adapter->pdev)) > + pm_schedule_suspend(&adapter->pdev->dev, MSEC_PER_SEC * 5); > +} > + [ ... ] > @@ -9764,7 +9772,7 @@ static int igb_runtime_idle(struct device *dev) > struct igb_adapter *adapter = netdev_priv(netdev); > > if (!igb_has_link(adapter)) > - pm_schedule_suspend(dev, MSEC_PER_SEC * 5); > + igb_schedule_runtime_suspend(adapter); > > return -EBUSY; > } [Severity: Low] This isn't a bug, but two existing comments that describe this path are now out of date. They don't mention the new pci_dev_run_wake() check. The comment above igb_rpm_retry_task() says: /* Resuming and releasing the device runs igb_runtime_idle(), which schedules * a new suspend if the link is still down */ And the comment in __igb_shutdown() says: * Only try to take it: -EBUSY keeps the device active, and * igb_rpm_retry_task() schedules a new suspend. */ With this patch, the retry path goes through igb_rpm_retry_task()->pm_runtime_put()->igb_runtime_idle()-> igb_schedule_runtime_suspend(). That path no longer schedules a suspend when pci_dev_run_wake() has become false since the original suspend was scheduled. The commit message explicitly considers that case. Could these two comments be updated to say the new suspend is only scheduled if the device can still wake up? -- Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130213740.3323814-1-antonio%40mandelbit.com