From: Mario Limonciello <mario.limonciello@amd.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Bjorn Helgaas <helgaas@kernel.org>
Cc: <linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-acpi@vger.kernel.org>,
Iain Lane <iain@orangesquash.org.uk>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>,
Mario Limonciello <mario.limonciello@amd.com>
Subject: [PATCH v14.c 2/4] PCI: ACPI: Consider non-hotplug bridges for D3 in acpi_pci_bridge_d3()
Date: Fri, 18 Aug 2023 14:40:25 -0500 [thread overview]
Message-ID: <20230818194027.27559-3-mario.limonciello@amd.com> (raw)
In-Reply-To: <20230818194027.27559-1-mario.limonciello@amd.com>
acpi_pci_bridge_d3() only runs on hotplug bridges. Two checks are made
for _S0W and for whether a device is power manageable contingent upon
an ACPI companion being present.
These checks also make sense for non-hotplug bridges, so move the
check for hotplug bridge after the acpi companion checks.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/pci/pci-acpi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index b5b65cdfa3b8b..64e6ada024235 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -1017,7 +1017,7 @@ bool acpi_pci_bridge_d3(struct pci_dev *dev)
struct acpi_device *adev, *rpadev;
const union acpi_object *obj;
- if (acpi_pci_disabled || !dev->is_hotplug_bridge)
+ if (acpi_pci_disabled)
return false;
adev = ACPI_COMPANION(&dev->dev);
@@ -1039,6 +1039,9 @@ bool acpi_pci_bridge_d3(struct pci_dev *dev)
return true;
}
+ if (!dev->is_hotplug_bridge)
+ return false;
+
rpdev = pcie_find_root_port(dev);
if (!rpdev)
return false;
--
2.34.1
next prev parent reply other threads:[~2023-08-18 19:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-18 19:40 [PATCH v14.c 0/4] Use LPS0 constraints to opt devices into D3 Mario Limonciello
2023-08-18 19:40 ` [PATCH v14.c 1/4] PCI: ACPI: Add helper functions for converting ACPI <-> PCI states Mario Limonciello
2023-08-21 18:35 ` Rafael J. Wysocki
2023-08-18 19:40 ` Mario Limonciello [this message]
2023-08-21 18:36 ` [PATCH v14.c 2/4] PCI: ACPI: Consider non-hotplug bridges for D3 in acpi_pci_bridge_d3() Rafael J. Wysocki
2023-08-18 19:40 ` [PATCH v14.c 3/4] PCI: ACPI: Use device constraints to opt devices into D3 support Mario Limonciello
2023-08-21 18:38 ` Rafael J. Wysocki
2023-08-18 19:40 ` [PATCH v14.c 4/4] PCI: ACPI: Limit the Intel specific opt-in to D3 to 2024 Mario Limonciello
2023-08-21 18:46 ` Rafael J. Wysocki
2023-08-21 19:18 ` Limonciello, Mario
2023-08-21 19:24 ` Rafael J. Wysocki
2023-08-21 19:26 ` Limonciello, Mario
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230818194027.27559-3-mario.limonciello@amd.com \
--to=mario.limonciello@amd.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=helgaas@kernel.org \
--cc=iain@orangesquash.org.uk \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael@kernel.org \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®