From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.84.56 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796299650; b=uHhM6GQqTWAeDA7O67oNrFwycwmPJqZ8UCJ5NngstuQgXegJUIG50hweiBM1Q/zrsahm 2PIX9Jd66CdgiYy1y2UrerptpKptRzG4atdnYxI55nhhQmUDrTMSmv2mXqE8RmCo8QC0E JEJFGtlWIcscoIBruwa3T6sB69I1vPWIvEXho0i3lPLiRsT2y4/dbD9refhf23FtEX7fp o0FajyEfSXeeAeRUacNL2/RAMj8MrXAYVbBMWpZYYWAMoiTKw9h1W3o3fKLAqdHKt2wKA nwDtVH0BsPKhvSRsKtnN7WlckLIpNtU6zUiEvB9v1PVufWBhHEd5Jxf3i7JZ1WJ0yaQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796299650; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding: X-Last-TLS-Session-Version; bh=6x5uTWVRKeoJFFhQBOeDjmy6nEUYOV1Zek4gbyYMjGc=; b=ef62qU6FsWV8IHQNQDZyLBOpOGx5PLl/as1EgD1nIu+f1lXcd01pavsDRysnTXp48Jkk bcD2fUjt211W9Qg00AbckkK9pFg72UCDiCGrGMpIz7w9Vs5psLuCVM8UfC6PA4XPh78c4 FCiT9nMjGmm/wBwFeAgdEWcK1bUZMgsfSr+xMKZgf9EOA3pTOYrGz1aLjLUUCNgV/rR6l ECYu36oHf8bXOl+5SD2/z0hvM171QsquqJKOfkosoIRSiUJuGlqGTycuiB0KKyzH5KPzl kCDUJTNz4eR5BrQeyAj/6z45o/q/CZz07ZNuu85G0yAU/BoGryKrxaSV1bpOhyQOxrg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=sUiMrlzt; arc=none smtp.remote-ip=185.246.84.56 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 6E707606A332 for ; Thu, 3 Dec 2026 12:07:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6E707606A332 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=sUiMrlzt Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id E04501A18FC; 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-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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 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