From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6DC59606AA4E for ; Thu, 3 Dec 2026 12:07:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=xTAQZu0Y; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=sUiMrlzt DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=6x5uTWVRKeoJFFhQBOeDjmy6nEUYOV1Zek4gbyYMjGc=; b=xTAQZu0YS9XaG2 uIiGes0N3tXcuXZZ52qRGJmXyYq8tuKFIhORw2O+iBjpmn/QOQd5l5Hrgw7/u9yA+Xyl7qR0kFrgd imOgVavrxZsUitZ4IIKELntKLgL2CGdv8ZrGXxbHonFj85nrwLZq+Dgl3suaeCnzn2jg3Tc3NglGV 90OSNxhkrn6FFf8ktHnIDqlrTLqSbfVmxa0jLKZVr5JMz2h+oJsYCsSQpYGZmajxOxgnn96x68Z5m hT0UN863fYXOziqLnrwYWydPPqtJEzsg58+kTkAWTLD5FETGR4fo2V6J4pDS4OXMM2uEtW37RYk4d ZckFlflKBC//yeeM5HyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ5b5-0000000EWsC-16ky; Thu, 03 Dec 2026 12:07:35 +0000 Received: from smtpout-03.galae.net ([185.246.85.4]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ5b0-0000000EWr8-22ks for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 12:07:34 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id E67E64E4185D; Thu, 3 Dec 2026 12:07:28 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id B40FA604ED; Thu, 3 Dec 2026 12:07:28 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 2395E11EA17F1; Thu, 03 Dec 2026 13:07:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796299647; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=6x5uTWVRKeoJFFhQBOeDjmy6nEUYOV1Zek4gbyYMjGc=; b=sUiMrlztNFsWfORKVB1C0tTt4c17U1VCP3b4wDNZ/EVO1eBQT+wCIcnE7AnNCj+Pyx+qfq JEpJBzUyroBfGU6BVMG91q2nnkdMHHkap1IK8tWXl0lhh2QB8EPhj5W+mfpdaX951j4gQn w02twoYKxoicIiCWUr9aBzEqr/XKxIhIjDNpFwdJb/cJtpQ5O5qrfFA2xMIhH2tEvFofcC pUttPayNKwUoolzqxRuPJO8hi/dmWo5bzTrRPeP8R62Hc9gfEVC8HLuCJK8QV47+aGJr21 CFNvQvtCIxV9CGqvythaiA/7Ecm/ghSCyz7JuruPy/j5aiUc7qiVFAuI9qRz7A== Message-ID: Date: Thu, 3 Dec 2026 13:07:19 +0100 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net] net: stmmac: intel: Do not call pcim_enable_device() on resume To: arina.kharlamova@mbzuai.ac.ae, Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Bjorn Helgaas , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Philipp Stanner Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org References: <20261201-s2p-d103-v1-1-4304d05f8af8@mbzuai.ac.ae> From: Maxime Chevallier Content-Language: en-US In-Reply-To: <20261201-s2p-d103-v1-1-4304d05f8af8@mbzuai.ac.ae> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_040731_006699_75895976 X-CRM114-Status: GOOD ( 20.38 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi, On 12/1/26 20:14, Arina Kharlamova via B4 Relay wrote: > From: Arina Kharlamova > > intel_eth_pci_resume() calls pcim_enable_device() although the device > is enabled in probe and intel_eth_pci_suspend() does not disable it. > Since commit 77f79ac8de0f ("PCI: Remove struct pci_devres.enabled > status bit") each call raises the enable count. Since commit > f748a07a0b64 ("PCI: Remove legacy pcim_release()") each call also adds > a pcim_disable_device() devres action. Both pile up with every > suspend and resume until the device is unbound. The call does not > touch the hardware, because the enable count is already above zero > there. > > The device stays enabled across suspend, so drop the call. > > Fixes: 77f79ac8de0f ("PCI: Remove struct pci_devres.enabled status bit") > Fixes: f748a07a0b64 ("PCI: Remove legacy pcim_release()") > Signed-off-by: Arina Kharlamova Reviewed-by: Maxime Chevallier Maxime > --- > I found this while checking the other drivers that call > pcim_enable_device() again on resume, after the discussion of the t7xx > fix: > https://lore.kernel.org/all/20261201-s2p-d64-v1-1-c9147b2eedb0@mbzuai.ac.ae/ > > With the help of an AI coding assistant (Claude); I reviewed the > analysis and the fix. Not triggered at runtime. Compile-tested only, > not tested on hardware. > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > index fcd8008545c2..d624f61a35d9 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > @@ -1269,15 +1269,9 @@ static int intel_eth_pci_suspend(struct device *dev, void *bsp_priv) > static int intel_eth_pci_resume(struct device *dev, void *bsp_priv) > { > struct pci_dev *pdev = to_pci_dev(dev); > - int ret; > > pci_restore_state(pdev); > pci_set_power_state(pdev, PCI_D0); > - > - ret = pcim_enable_device(pdev); > - if (ret) > - return ret; > - > pci_set_master(pdev); > > return 0; > > --- > base-commit: c712df600d056cc35ef7621e43c8e12513bae886 > change-id: 20261201-s2p-d103-40aa9498b98d > > Best regards, > -- > Arina Kharlamova