From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D6D8CEF5862 for ; Tue, 24 Feb 2026 16:58:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 851CD84550; Tue, 24 Feb 2026 16:58:44 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id s0UDG7hN9UXq; Tue, 24 Feb 2026 16:58:43 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 0C8908454F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1771952323; bh=Zox7phvQEWkmUjnhvtNvfEHwMsGMw74VYAnRhilWexk=; h=Date:From:To:Cc:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From; b=SAq4J2+LcbfsPWNKzl78MxEVnHXH/owX2gb9448lcjy6ntRnoW+wFfhhQH9qOd/cx 3UbXHo1nyQrquud7ZnPXQU2jB4u2mjxE+31vVxNSzHgJWcnlHPx49p7yiP0wg9pFC2 VOiPEuL2txvHZNYsGn16KXRteJSLvMhZUraF6AJt9t5F83iLO0pa4E5hP6WouJiwPo ogHggUXRnF1Y9zSSacNMA6g0j1ngVILkknXyzf0T5O8JC0crb3+lUv/9UFSfXkAA5g ZhaXWKKZAVtNUjDfgrKp1LC9ZPprHpagRNk+oQqE4IOhjXXCR78s5GCB1oaoKpn+fd OTW87Jp5ZkAmQ== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 0C8908454F; Tue, 24 Feb 2026 16:58:43 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists1.osuosl.org (Postfix) with ESMTP id 48EAE249 for ; Tue, 24 Feb 2026 16:58:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 46708407DB for ; Tue, 24 Feb 2026 16:58:41 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 6uHqtwiBilnD for ; Tue, 24 Feb 2026 16:58:40 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=helgaas@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 9BB5C40362 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9BB5C40362 Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by smtp2.osuosl.org (Postfix) with ESMTPS id 9BB5C40362 for ; Tue, 24 Feb 2026 16:58:40 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id A56A260053; Tue, 24 Feb 2026 16:58:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30BD2C116D0; Tue, 24 Feb 2026 16:58:39 +0000 (UTC) Date: Tue, 24 Feb 2026 10:58:37 -0600 From: Bjorn Helgaas To: Mika Westerberg Cc: linux-pci@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Bjorn Helgaas , Lukas Wunner , Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S . Miller" , Eric Dumazet , Paolo Abeni , Saeed Mahameed , Leon Romanovsky , Tariq Toukan , Mark Bloch , Richard Cochran , Andy Shevchenko , Vitaly Lifshits , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Vinicius Costa Gomes , Dima Ruinskiy Message-ID: <20260224165837.GA3736201@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260224111044.3487873-3-mika.westerberg@linux.intel.com> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771952319; bh=siQjsKnJuhuW3XUqku5HX25GJOs/BK8nuegDHFGMHIc=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=DYMc6Wskj4xkhmLQdMdsuiEdJWI66KqbasbEvT1KFsX6E1TzKu52L6jtI10bVP97u n6YC1U3/juI+0meYG5LC2+/64CG23usJvSmZ3mlrd1S7179/rIsdhGHWwABwbdalk6 tKYHjcpL+kdnnZcOkr+4UvWs/fnYyv3Fh6+7Y3X4jaPlJEmJ5MRTGoZZyFv7zH0hK0 1Remt4YfQvRY1kuCWWzeeJJtjg6qaVxHUYjsF6ePqRzVzCCyDf8/iR8S1B94WiEq79 6PNUwZxVN0/D3BXOfLHS4tB7ih+DUMs0OwRAy5HtXvNBtJd5gw0Gl9pTVnfAqu2RAx eqEEYdXDnvyHQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=DYMc6Wsk Subject: Re: [Intel-wired-lan] [PATCH 2/5] igc: Let the PCI core deal with the PM resume flow X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Tue, Feb 24, 2026 at 12:10:41PM +0100, Mika Westerberg wrote: > Currently igc driver calls pci_set_power_state() and pci_restore_state() > and the like to bring the device back from low power states. However, > PCI core handles all this on behalf of the driver. Furthermore with PTM > enabled the PCI core re-enables it on resume but the driver calls > pci_restore_state() which ends up disabling it again. > > For this reason let the PCI core handle the common PM resume flow. > > Signed-off-by: Mika Westerberg > Reviewed-by: Andy Shevchenko I love it, thanks a lot for doing this! Do we still need the pci_enable_device_mem() and pci_set_master() in __igc_resume()? I suppose some of that is related to the pci_disable_device() in the suspend path (__igc_shutdown()), but there are only a few dozen drivers that do this, so I'm not sure it's essential. > --- > drivers/net/ethernet/intel/igc/igc_main.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c > index 7ffd34bfa14e..99a4c99ddd57 100644 > --- a/drivers/net/ethernet/intel/igc/igc_main.c > +++ b/drivers/net/ethernet/intel/igc/igc_main.c > @@ -7526,9 +7526,6 @@ static int __igc_resume(struct device *dev) > struct igc_hw *hw = &adapter->hw; > u32 err, val; > > - pci_set_power_state(pdev, PCI_D0); > - pci_restore_state(pdev); > - > if (!pci_device_is_present(pdev)) > return -ENODEV; > err = pci_enable_device_mem(pdev); > @@ -7538,9 +7535,6 @@ static int __igc_resume(struct device *dev) > } > pci_set_master(pdev); > > - pci_enable_wake(pdev, PCI_D3hot, 0); > - pci_enable_wake(pdev, PCI_D3cold, 0); > - > if (igc_is_device_id_i226(hw)) > pci_disable_link_state(pdev, PCIE_LINK_STATE_L1_2); > > -- > 2.50.1 >