Article View: linux.kernel.netdev
Article #23881Re: [PATCH net v5 6/6] igb: only allow runtime PM if the device can wake up
From: Janis Edvarts Lacis
Date: Sat, 28 Nov 2026 13:40
Date: Sat, 28 Nov 2026 13:40
74 lines
13928 bytes
13928 bytes
On 25 Nov 00:57, Antonio Quartulli wrote:
>igb lets the device be runtime suspended even if it can't signal a
>wake-up from D3. Such a device doesn't notice the link coming back, so
>the port stays down until it is resumed from user space.
>
>Only schedule a runtime suspend if pci_dev_run_wake() is true. Devices
>that can't wake up no longer runtime suspend, even with power/control
>set to auto. Checking it when scheduling the suspend, rather than at
>probe and remove as e1000e and r8169 do, keeps the runtime PM usage
>count balanced if the result changes while the driver is bound.
>
>Tested with the 82576 emulated by QEMU.
>
>Fixes: 749ab2cd1270 ("igb: add basic runtime PM support")
>Cc: stable@vger.kernel.org
>Closes: https://bugzilla.ipfire.org/show_bug.cgi?id=13562
>Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
>---
>v5: check pci_dev_run_wake() when scheduling the suspend rather than
>at probe and remove, which keeps the usage count balanced (Sashiko)
>v4: no changes
>v3: no changes
>v2: no code changes; mention the tested hardware
>
>Note: igc has the same issue: igc_probe() also allows runtime PM
>regardless of pci_dev_run_wake().
>
> drivers/net/ethernet/intel/igb/igb_main.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
>index 80ae03d..853bdf4 100644
>--- a/drivers/net/ethernet/intel/igb/igb_main.c
>+++ b/drivers/net/ethernet/intel/igb/igb_main.c
>@@ -5625,6 +5625,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);
>+}
>+
> static void igb_watchdog_task(struct work_struct *work)
> {
> struct igb_adapter *adapter = container_of(work,
>@@ -5777,8 +5786,7 @@ no_wait:
> return;
> }
> }
>- pm_schedule_suspend(netdev->dev.parent,
>- MSEC_PER_SEC * 5);
>+ igb_schedule_runtime_suspend(adapter);
>
> /* also check for alternate media here */
> } else if (!netif_carrier_ok(netdev) &&
>@@ -9741,7 +9749,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;
> }
>--
>2.56.1
>
Reviewed-by: Janis Edvarts Lacis <janislacis06@gmail.com>
Technical Details
Message-ID:
<ri6pk2cv4qsc3lyumnpskogyadfhhk2aybgwyvbpdfoetkrbjf@efy5saiqmdzy>Path:
mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373141-linux-kernel-netdev=dewy.ruReferences:
<20261124235723.1135808-1-antonio@mandelbit.com> <20261124235723.1135808-7-antonio@mandelbit.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373141-linux-kernel-netdev=dewy.ru
From: janislacis06@gmail.com (Janis Edvarts Lacis)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v5 6/6] igb: only allow runtime PM if the device can
wake up
Date: Sat, 28 Nov 2026 15:40:24 +0200
Organization: Usenet Network
Message-ID: <ri6pk2cv4qsc3lyumnpskogyadfhhk2aybgwyvbpdfoetkrbjf@efy5saiqmdzy>
References: <20261124235723.1135808-1-antonio@mandelbit.com>
<20261124235723.1135808-7-antonio@mandelbit.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Injection-Info: usenet.network;
logging-data="957336"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Rxn2f9B8TqWdU2wx0Oq0VjXPnbE= sha256:18EtZ5I8vM9cEBBjGsmAHLDZthmEuj1Oquul+J0Fc2Q=
sha1:xojsMddKYN6LqmIHPavbDzddIaM= sha256:eAoY2fU23wL64BqsRaCvuMmuqCINo+nVU9da9RCad+s=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 1B95D125F77; Sat, 28 Nov 2026 16:40:44 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 19VWv38mJp_D;
Sat, 28 Nov 2026 16:40:40 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-373141-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 38E55125F76; Sat, 28 Nov 2026 16:40:32 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id E87B12A63E; Sat, 28 Nov 2026 13:40:29 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795873229;
b=cohjJQfX6plS5uB7UTY9VExpUldHYAcvVR5liNKlw+Uw5Fw5uEUJiG6JfXdk7Hbg0bY1
LJ5wI4U6u8N7kJWpIPXDRDm092gLd1cCX5UJiAXRolEW9p678q6t6gqdljlMWgqLy0mje
pMzJL8P/fKNTQbRMdnHiWE5AOHuZ/4pDTCAbgVQ8p2npZ5O8Joxofr5NZwuGFYBi6j7Mj
FPQnIzd6xY8zuQQhgMEOU9COw28lpmpulLYgyX2u4Taywg5k5QNgFS7KorqSasGZnBcVu
uZXvcchPTfWu4lyuE5OUzYFwtbUg///bEo/5q+Oyrb1rdV4Xoq24vsL9KeK7D8t1zDA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795873229;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:Date:From:To:Cc:Subject:Message-ID:
References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
Content-Disposition:In-Reply-To;
bh=QyFV4pisqndkw4NPxkRB4pgaLfPMNmkrYfYabK5Jawo=;
b=ajDX8hr0KWc76J0ZBsrgHLt/fohYGtOVB4Bsj8BP1L0DQD0N8Uu3OVRUZKKEDUKeDOfR
IGtldRi5n6ZEtgBYFbmNwXgjH994VS7biJDJi/HL6YscITU/XxrEr+PI7hIRp1TosPHDe
NPmxiM+PrmY1dS6t7WUVbiawGywwdUJJHcn8YWOuZ4CnKgxp2Rd0dB4RmtEyZgFYMoo7v
E6H6duR33TIDTm7zN9vWKaQHflo+UPyypNy0WNVWIkOrkdWvz6p/gNfjjCeH+PYzXsYij
FnyKnmOt0UtJo2ErxwfNPMeAgFQknbbEp6CtwhoKiRvAz4FA/Nm7bMDF6jfHG5OLlow==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Hyy8BE7T;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3DA47606A331;
Sat, 28 Nov 2026 13:40:29 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Hyy8BE7T
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.45
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1795873228;
b=QvNdI/IqWMVHL6SDgPUgvw/OFxKGTAmumlOVDjW55xxVRRN7070w5CAkILhF9XP+IemH
7USat5ZSDXVDtHzubu5pP/9ARSuXLYRdPRC+rhIrCepHOwRn0c5UlD49TA4RTv0tHocMx
E4JL5GbMdQMo8DhxZXUwuqqpAExNAlmVKQmGtg/cRvTeoI+iHVpi4cSV/54GS79N5cDiH
va7VPpJb2niLpVJ1l59kynYOJABFZxVGYLilfCPN8yYxCZ2pIAzpwYq5OgNsPHEIgbwxN
Fz7YnEsy2VP6eF8Uyq5lAA8xy5BP1UWDk2IWaIj2+/3wZLetPNiSPpNamliDSs00+PA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795873228;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To;
bh=QyFV4pisqndkw4NPxkRB4pgaLfPMNmkrYfYabK5Jawo=;
b=XBzDS5MIsZcMOM/EA2fQcU+EAiM4o75RpXuEnPjH9oTMCyCiJkpaqDGMmFwTtN/5utAh
NsYGIZAUSUVbP2BGBzY0Cr1mzHHOhWGzTJR4HHFTnW3jbTyPlObgXQ8w30Y+qTukWIoBs
uSaryV2rm8KVvo1OXeZLIj+sZFHXo1l5Mtlk6ntbkLXxLAjvlzA4m/QEncSuT4A/VGy24
MzVCajqnlbIRjmffuhuPGodEDU8pRU/tDKX0km/4B7rGdGDs/eShD2NoBpVLhrumu1YO6
UjtvVR9bjsAkfLbWZNMM/BGIynB33xP/WbjiKqopqueCwCPx4+N14N64FyehABLiGQg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Hyy8BE7T;
arc=none smtp.remote-ip=209.85.128.45
X-Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19050606A31F
for <netdev@vger.kernel.org>; Sat, 28 Nov 2026 13:40:27 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 19050606A31F
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4bba60271d7so33225205e9.2
for <netdev@vger.kernel.org>; Sat, 28 Nov 2026 05:40:27 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1795873226; x=1796478026; darn=vger.kernel.org;
h=in-reply-to:content-disposition:content-type:mime-version
:references:message-id:subject:cc:to:from:date:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=QyFV4pisqndkw4NPxkRB4pgaLfPMNmkrYfYabK5Jawo=;
b=Hyy8BE7ThnPiEgCqVkJoKTCxCsy9TFJLNY9Xbv5dw5e02Rrpqietxr4bgIIee3ira5
rGlIml89ZGFsNTqero2ajm+P+6KFgWdpvWDgVIFUsHkWV0YSOmP9p5IOi2uSFZzhWhVm
4nkF3R9OtX/3U/3Ihmmu5ZB/MyM1gM5FkALLdcX3396e+lJnBqGDreoTxX+tG6rBwIS+
TfZwdzqLM8QkLn++l+YSRlYqIIHk3mE16+ggxqn9QxL9vyuEw5m5IiM6gtjF2c3eNVJo
LDE53a/PCBf71+FrgEJlYOD5cQ+dDSMbgoMdK+qcEWZC9FXSeY+U4q8+AD4eeWjhEjHK
oN1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1795873226; x=1796478026;
h=in-reply-to:content-disposition:content-type:mime-version
:references:message-id:subject:cc:to:from:date:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=QyFV4pisqndkw4NPxkRB4pgaLfPMNmkrYfYabK5Jawo=;
b=18CPeD/MRD3LVHC7Jdmk3nafmCzUsaQYVGH47inKqcLj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cV/
jKrMiNR+VozFBh8SKzfa4dgdVsMB6ogZt8ieGgBrsSJjqyrHHe6c+yljcNdQn3lfEqAPQHPlhPt
JA999kFu3fbxgf+7v/cO1WvTtnbsLDXHgFPFnXs2ajsIcAtv2kraagJq/XCRsNB++zu1ns+d9PF
C/SwXabPvjMV1Aq/wjcdRueY3OQuD3SGuymU=
X-Received: by 2002:a05:600c:4e16:b0:4bb:69b2:d3df with SMTP id 5b1f17b1804b1-4bb88813024mr568205445e9.25.1795873226378;
Sat, 28 Nov 2026 05:40:26 -0800 (PST)
X-Received: from pc.tail250202.ts.net ([87.110.86.243])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb8538b09bsm1404838525e9.4.2026.11.28.05.40.25
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sat, 28 Nov 2026 05:40:25 -0800 (PST)
X-Cc: intel-wired-lan@lists.osuosl.org,
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@kernel.org>, Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261124235723.1135808-7-antonio@mandelbit.com>