Netdev List
 help / color / mirror / Atom feed
From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: intel-wired-lan@lists.osuosl.org
Cc: Felix Moessbauer <felix.moessbauer@siemens.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"Yan, Zheng" <zheng.z.yan@intel.com>,
	netdev@vger.kernel.org, vivek.behera@siemens.com
Subject: [PATCH net 1/1] igb: Return state in pm_runtime_idle instead of power-down
Date: Tue,  5 May 2026 12:11:34 +0200	[thread overview]
Message-ID: <20260505101141.2657169-1-felix.moessbauer@siemens.com> (raw)

The PM runtime_idle API expects to get an indication if the device can
be powered down. Instead of returning the appropriate state, we
currently directly power down the device (if not active) and return
that the device is busy.

We change this by making the function side-effect free and just return
the state.

Fixes: 749ab2cd12704 ("igb: add basic runtime PM support")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index ce91dda00ec0e..e8ab0b506a104 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -9652,7 +9652,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);
+		return 0;
 
 	return -EBUSY;
 }
-- 
2.53.0


             reply	other threads:[~2026-05-05 10:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05 10:11 Felix Moessbauer [this message]
2026-05-08  9:56 ` [PATCH net 1/1] igb: Return state in pm_runtime_idle instead of power-down Simon Horman

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=20260505101141.2657169-1-felix.moessbauer@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=vivek.behera@siemens.com \
    --cc=zheng.z.yan@intel.com \
    /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