[PATCH v5 2/2] Add acpi_check_dsm() for PCI _DSM definitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



add acpi_check_dsm() for DSM_PCI_POWER_ON_RESET_DELAY,
DSM_PCI_DEVICE_READINESS_DURATIONS.

Signed-off-by: Zhou Shengqing <zhoushengqing@xxxxxxxxxxx>
---
 drivers/pci/pci-acpi.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 4f9e0548c96d..47caad28a133 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -1257,6 +1257,10 @@ void acpi_pci_add_bus(struct pci_bus *bus)
 	if (!pci_is_root_bus(bus))
 		return;
 
+	if (!acpi_check_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 3,
+				BIT(DSM_PCI_POWER_ON_RESET_DELAY)))
+		return;
+
 	obj = acpi_evaluate_dsm_typed(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 3,
 				      DSM_PCI_POWER_ON_RESET_DELAY, NULL, ACPI_TYPE_INTEGER);
 	if (!obj)
@@ -1418,6 +1422,10 @@ static void pci_acpi_optimize_delay(struct pci_dev *pdev,
 	if (bridge->ignore_reset_delay)
 		pdev->d3cold_delay = 0;
 
+	if (!acpi_check_dsm(handle, &pci_acpi_dsm_guid, 3,
+				BIT(DSM_PCI_DEVICE_READINESS_DURATIONS)))
+		return;
+
 	obj = acpi_evaluate_dsm_typed(handle, &pci_acpi_dsm_guid, 3,
 				      DSM_PCI_DEVICE_READINESS_DURATIONS, NULL,
 				      ACPI_TYPE_PACKAGE);
-- 
2.39.2





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux