[{"id":3688277,"web_url":"http://patchwork.ozlabs.org/comment/3688277/","msgid":"<20260508095659.GM15617@horms.kernel.org>","list_archive_url":null,"date":"2026-05-08T09:56:59","subject":"Re: [Intel-wired-lan] [PATCH net 1/1] igb: Return state in\n pm_runtime_idle instead of power-down","submitter":{"id":82748,"url":"http://patchwork.ozlabs.org/api/people/82748/","name":"Simon Horman","email":"horms@kernel.org"},"content":"+ David Ertman, Sasha Neftin, Heiner Kallweit\n\nOn Tue, May 05, 2026 at 12:11:34PM +0200, Felix Moessbauer wrote:\n> The PM runtime_idle API expects to get an indication if the device can\n> be powered down. Instead of returning the appropriate state, we\n> currently directly power down the device (if not active) and return\n> that the device is busy.\n> \n> We change this by making the function side-effect free and just return\n> the state.\n> \n> Fixes: 749ab2cd12704 (\"igb: add basic runtime PM support\")\n> Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>\n> ---\n>  drivers/net/ethernet/intel/igb/igb_main.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\n> index ce91dda00ec0e..e8ab0b506a104 100644\n> --- a/drivers/net/ethernet/intel/igb/igb_main.c\n> +++ b/drivers/net/ethernet/intel/igb/igb_main.c\n> @@ -9652,7 +9652,7 @@ static int igb_runtime_idle(struct device *dev)\n>  \tstruct igb_adapter *adapter = netdev_priv(netdev);\n>  \n>  \tif (!igb_has_link(adapter))\n> -\t\tpm_schedule_suspend(dev, MSEC_PER_SEC * 5);\n> +\t\treturn 0;\n>  \n>  \treturn -EBUSY;\n>  }\n\nHi Felix,\n\nI am not sure this is the right approach, are you seeing a behavioural\nproblem?\n\n\nThis pattern seems to also be present in at least e1000e, igc and r8169.\n\nThe igb and e1000e implementations seem to have co-evolved [1][2],\npossibly in conjunction with OOT versions of each driver.\nThe igc implementation came later, perhaps copying e1000e or igb [3].\n\nThe git log for r8169 seems to provide a justification for why that\ndriver users this approach [4].\n\n    - Let the idle notification check whether we can suspend and let it\n      schedule the suspend. This way we don't need to have calls to\n      pm_schedule_suspend in different places.\n\nWhile the current e1000e implementation seems to address some reliability\nissues [1], although it's not entirely clear to me how that relates to the\nissue at hand.\n\n    Fix issues with:\n    RuntimePM causing the device to repeatedly flip between suspend and resume\n    with the interface administratively downed.\n    Having RuntimePM enabled interfering with the functionality of Energy\n    Efficient Ethernet.\n\n    Added checks to disallow functions that should not be executed if the\n    device is currently runtime suspended\n\n    Make runtime_idle callback to use same deterministic behavior as the igb\n    driver.\n\n[1] 63eb48f151b5 (\"e1000e Refactor of Runtime Power Management\")\n    Fri Feb 14 07:16:46 2014 +0000\n[2] 749ab2cd1270 (\"igb: add basic runtime PM support\")\n    Wed Jan 4 20:23:37 2012 +0000\n[3] 9513d2a5dc7f (\"igc: Add legacy power management support\")\n    Thu Nov 14 09:54:46 2019 +020\n[4] a92a08499b1f (\"r8169: improve runtime pm in general and suspend unused ports\")\n    Mon Jan 8 21:39:13 2018 +0100","headers":{"Return-Path":"<intel-wired-lan-bounces@osuosl.org>","X-Original-To":["incoming@patchwork.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=DnozxMP3;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBl070N4rz1yCg\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 19:57:11 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 49BF0615B8;\n\tFri,  8 May 2026 09:57:09 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id g4aQgmMAT5al; Fri,  8 May 2026 09:57:08 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 89FD561597;\n\tFri,  8 May 2026 09:57:08 +0000 (UTC)","from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by lists1.osuosl.org (Postfix) with ESMTP id 5B562358\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2026 09:57:07 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 415D561597\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2026 09:57:07 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id YecAysLadmku for <intel-wired-lan@lists.osuosl.org>;\n Fri,  8 May 2026 09:57:06 +0000 (UTC)","from tor.source.kernel.org (tor.source.kernel.org\n [IPv6:2600:3c04:e001:324:0:1991:8:25])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 71D1C61565\n for <intel-wired-lan@lists.osuosl.org>; Fri,  8 May 2026 09:57:06 +0000 (UTC)","from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n by tor.source.kernel.org (Postfix) with ESMTP id C2A3E600AE;\n Fri,  8 May 2026 09:57:04 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id B22CEC2BCB0;\n Fri,  8 May 2026 09:57:01 +0000 (UTC)"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp3.osuosl.org 89FD561597","OpenDKIM Filter v2.11.0 smtp3.osuosl.org 71D1C61565"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1778234228;\n\tbh=/WQPCH8rZZqCoWypgRIbKlEQrHxknclHn7hdoUhbb+0=;\n\th=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=DnozxMP3BMVFrOTmGUGYo0Ed9QT6XSEwfEAyCWXWSF++g3lVkiJV1zgig40DDFUH6\n\t iObiEl6exMFU7CjsQK7uavy7Noh1S/8VjAWqyMSF/nA7fRlLRTgxbzxIZXdQngRz+A\n\t RJ57tLbXn3+z3yZYN+OpAnfDnDz8R07qlh6ILA+TDrqtjItbsPYJmLG4DSO+OYiuoK\n\t 5EuWpjFbJxy9WZ8KHqFA1nMhDARdrbzTH1Lb6FAMWC4wepUcZQbYh5DA2/0wnXDa/L\n\t YbGL5UsLhH3atpWPpe+5XNQURPsMkFy/H0l+9BsTq56wF1gvNRzibbtu1DOT1rwtVo\n\t MHeCivJUfQKcg==","Received-SPF":"Pass (mailfrom) identity=mailfrom;\n client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org;\n envelope-from=horms@kernel.org; receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp3.osuosl.org 71D1C61565","Date":"Fri, 8 May 2026 10:56:59 +0100","From":"Simon Horman <horms@kernel.org>","To":"Felix Moessbauer <felix.moessbauer@siemens.com>","Cc":"intel-wired-lan@lists.osuosl.org,\n Tony Nguyen <anthony.l.nguyen@intel.com>,\n Przemek Kitszel <przemyslaw.kitszel@intel.com>,\n Andrew Lunn <andrew+netdev@lunn.ch>,\n \"David S. Miller\" <davem@davemloft.net>,\n Eric Dumazet <edumazet@google.com>,\n Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,\n \"Yan, Zheng\" <zheng.z.yan@intel.com>, netdev@vger.kernel.org,\n vivek.behera@siemens.com, \"Ertman, David M\" <david.m.ertman@intel.com>,\n Sasha Neftin <sasha.neftin@intel.com>,\n Heiner Kallweit <hkallweit1@gmail.com>","Message-ID":"<20260508095659.GM15617@horms.kernel.org>","References":"<20260505101141.2657169-1-felix.moessbauer@siemens.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260505101141.2657169-1-felix.moessbauer@siemens.com>","X-Mailman-Original-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n d=kernel.org; s=k20201202; t=1778234224;\n bh=+NwiAjp9LkJwoEi3vGKUBZNVBjuSw+dVpFIiee9Ye9c=;\n h=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n b=EdWPPXrL7pED8iv6835crYgOH6/eyXoe07Tf6JwRZ28D2ddwZu7UNIqV1PGrOwQEv\n sDc9PKi0mbl8QinlsmIDvy6OF7QRNBsJbUu2vQqCuuSFucKCK4d57Cfc/BU83kMJ3P\n pCgbiOHejrdtevNMIt1byNhGCmvBmBFjObIWOVl14jq2o/MZgRjQfhHIh/pRHWyPmY\n byJVgjZ1RVF0hJwEadxPlIhPr3QG+/Pe1VbYE2VIjIqeDTf2BvkazysNqZ6I+/tfLk\n wnlPdVNTNwKecaFB0zL7jDQlxdNX7auz9lwjJgK3vGOsJ6qpAmQeY6v43Jmo7OF4K9\n p7bvYpn+GEDUA==","X-Mailman-Original-Authentication-Results":["smtp3.osuosl.org;\n dmarc=pass (p=quarantine dis=none)\n header.from=kernel.org","smtp3.osuosl.org;\n dkim=pass (2048-bit key,\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=EdWPPXrL"],"Subject":"Re: [Intel-wired-lan] [PATCH net 1/1] igb: Return state in\n pm_runtime_idle instead of power-down","X-BeenThere":"intel-wired-lan@osuosl.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>","List-Unsubscribe":"<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>","List-Archive":"<http://lists.osuosl.org/pipermail/intel-wired-lan/>","List-Post":"<mailto:intel-wired-lan@osuosl.org>","List-Help":"<mailto:intel-wired-lan-request@osuosl.org?subject=help>","List-Subscribe":"<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>","Errors-To":"intel-wired-lan-bounces@osuosl.org","Sender":"\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"}}]