aboutsummarylogtreecommitdiffstats
path: root/sys-kernel_arch-sources-g14_files-9010-ACPI-PM-s2idle-Don-t-report-missing-devices-as-faili.patch
blob: c77aa387e8b4541777d057776d76c86461538457 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From c5d0ba7e96f765859bb2ddbd5fc0407d7e6e7124 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <mario.limonciello@amd.com>
Date: Fri, 24 Sep 2021 12:32:06 -0500
Subject: [PATCH 1/2] ACPI: PM: s2idle: Don't report missing devices as failing
 constraints

ACPI tables may have entries for devices that are not physically
present but that can be connected.  These devices shouldn't cause
constraints checking to fail.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Change-Id: I34f5ca978aab69ff0a0906191eec21649b19fe27
---
 drivers/acpi/x86/s2idle.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
index bd92b549fd5a..c8d4f7909fa9 100644
--- a/drivers/acpi/x86/s2idle.c
+++ b/drivers/acpi/x86/s2idle.c
@@ -309,6 +309,12 @@ static void lpi_check_constraints(void)
 			continue;
 		}
 
+		if (!acpi_get_first_physical_node(adev)) {
+			acpi_handle_debug(handle, "LPI: Device is not physically present\n");
+			lpi_constraints_table[i].handle = NULL;
+			continue;
+		}
+
 		if (adev->power.state < lpi_constraints_table[i].min_dstate)
 			acpi_handle_info(handle,
 				"LPI: Constraint not met; min power state:%s current power state:%s\n",
-- 
2.25.1