From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD820334733; Wed, 10 Sep 2025 14:46:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757515601; cv=none; b=HI9NTD7lxjwO74UTyuBiDtCYZMh2Vgs+wtTL6LhNl9K0HsWVGCkYuHCU+rJmyCZzw8mUWFy0W24JU6U61F/jjvy+dG7vg7Ob3NV1S/41IEn3ziikxpZ1hO094JTq3rK8u3AmusQbtO++rolE0slb9pUCBr9/chVq0hiEG61cFJk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757515601; c=relaxed/simple; bh=84vkiPKqSEhuvDni8XCaT6y5jo/x6VM2Y2bOu716BLQ=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=jKiOC8JxrriFW786cbyiID7YT3hQUow7fBOXIKKT0ICCpEpuZHspPEDSv9Yhan6hLPml7C9AhKTMyNOJZ7ng+WEPmubkuNpzYl2a3GM0bYjfRYoRzIioozehzJAc3X0uQ73a3Ia35UHg94+7U+firlCoQyirs+ICWxPto6CNUO0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KW5pM2Fu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KW5pM2Fu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 316D6C4CEEB; Wed, 10 Sep 2025 14:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757515600; bh=84vkiPKqSEhuvDni8XCaT6y5jo/x6VM2Y2bOu716BLQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=KW5pM2FuSjJKYJW2gxcET8OcAb1Rldc9NmgcN9qu9VVRmQY8OImBUUUXcix8cQckW jSNVyqFL7amGmUf7wkuDldCw34x5vfC4fs3T9gVytGVRFENaEVt04KcarnAzlwVANz EZZVR3K9PvKcjR66/8+wda4Gbh22mxm1+1b02Io3rjhsYSpJ0yuZ6X2Mlh0Wlx9OKE UPYmMZFP2kT+2NusOrtQtR6VBmSZKiLAp0YARN/j0AEH/x1N4414csaGNJAQKkeTZS xVJ9pFYae9xPnC0wRLL3zV7z/6Tev21LW3sqB5+UN4uprUuhHM9oNAf6/Lx+6uGzIF Pjs15lLPM32qQ== Date: Wed, 10 Sep 2025 09:46:38 -0500 From: Bjorn Helgaas To: "Mario Limonciello (AMD)" Cc: "Rafael J . Wysocki" , Greg Kroah-Hartman , Danilo Krummrich , Bjorn Helgaas , Pavel Machek , Len Brown , Christian =?utf-8?B?S8O2bmln?= , "James E . J . Bottomley" , "Martin K . Petersen" , Steven Rostedt , "open list:HIBERNATION (aka Software Suspend, aka swsusp)" , "open list:RADEON and AMDGPU DRM DRIVERS" , "open list:DRM DRIVERS" , "open list:PCI SUBSYSTEM" , "open list:SCSI SUBSYSTEM" , "open list:USB SUBSYSTEM" , "open list:TRACING" , AceLan Kao , Kai-Heng Feng , Mark Pearson , Merthan =?utf-8?Q?Karaka=C5=9F?= , Eric Naim , "Guilherme G . Piccoli" Subject: Re: [PATCH v7 06/12] PCI/PM: Split out code from pci_pm_suspend_noirq() into helper Message-ID: <20250910144638.GA1535343@bhelgaas> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250909191619.2580169-7-superm1@kernel.org> On Tue, Sep 09, 2025 at 02:16:13PM -0500, Mario Limonciello (AMD) wrote: > In order to unify suspend and hibernate codepaths without code duplication > the common code should be in common helpers. Move it from > pci_pm_suspend_noirq() into a helper. No intended functional changes. > > Tested-by: Eric Naim > Signed-off-by: Mario Limonciello (AMD) Acked-by: Bjorn Helgaas If you have other reason to repost this, ... > + if (pci_dev->current_state == PCI_D0) { > + pci_dev->skip_bus_pm = true; Add a blank line here. > + /* > + * Per PCI PM r1.2, table 6-1, a bridge must be in D0 if any > + * downstream device is in D0, so avoid changing the power state > + * of the parent bridge by setting the skip_bus_pm flag for it. > + */ > + if (pci_dev->bus->self) > + pci_dev->bus->self->skip_bus_pm = true; > + }