Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
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
Subject: Re: [PATCH net v6 7/7] igb: only allow runtime PM if the device can wake up
Date: Tue, 01 Dec 2026 22:20:43 +0000	[thread overview]
Message-ID: <179616364306.3146.1188114987820092843@kernel.org> (raw)
In-Reply-To: <20261130213740.3323814-8-antonio@mandelbit.com>

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

      reply	other threads:[~2026-12-01 22:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 21:37 [PATCH net v6 0/7] igb: fix runtime PM resume issues Antonio Quartulli
2026-11-30 21:37 ` [PATCH net v6 1/7] igb: don't wait for RTNL when runtime suspending Antonio Quartulli
2026-11-30 21:37 ` [PATCH net v6 2/7] igb: don't touch rings that don't exist when disabling an XSK pool Antonio Quartulli
2026-11-30 21:37 ` [PATCH net v6 3/7] igb: fix RTNL assertion when resuming from runtime suspend Antonio Quartulli
2026-12-01 22:20   ` netdev-bot+sashiko
2026-11-30 21:37 ` [PATCH net v6 4/7] igb: keep the stack's Rx queues that still have an XSK pool Antonio Quartulli
2026-12-01 22:20   ` netdev-bot+sashiko
2026-11-30 21:37 ` [PATCH net v6 5/7] igb: link queues to NAPIs under RTNL after runtime resume Antonio Quartulli
2026-11-30 21:37 ` [PATCH net v6 6/7] igb: resume the device before changing XDP or XSK settings Antonio Quartulli
2026-12-01 21:38   ` sashiko-bot
2026-12-01 22:20   ` netdev-bot+sashiko
2026-11-30 21:37 ` [PATCH net v6 7/7] igb: only allow runtime PM if the device can wake up Antonio Quartulli
2026-12-01 22:20   ` netdev-bot+sashiko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179616364306.3146.1188114987820092843@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=antonio@mandelbit.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hawk@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=janislacis06@gmail.com \
    --cc=joe@dama.to \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kurt@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=rafael@kernel.org \
    --cc=sdf@fomichev.me \
    --cc=sriram.yagnaraman@ericsson.com \
    --cc=stable@vger.kernel.org \
    --cc=sven.auhagen@voleatech.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox