lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1449463473.2175.13.camel@kxue-X58A-UD3R>
Date:	Mon, 7 Dec 2015 12:44:33 +0800
From:	Ken Xue <ken.xue@....com>
To:	<rjw@...ysocki.net>, <lenb@...nel.org>,
	<linux-acpi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:	<SPG_Linux_Kernel@....com>, <mika.westerberg@...ux.intel.com>,
	"Andy Shevchenko" <andy.shevchenko@...il.com>,
	<Ivan.Zheng@....com>, <Alex.Chuang@....com>
Subject: [PATCH 1/1] ACPI: Support D3 COLD device for old BIOS

D3cold is only regarded as valid if the "_PR3" object is present
for the given device after the commit <20dacb71ad28>
(ACPI/PM: Reworkdevice power management to follow ACPI 6).

But some old BIOS only defined "_PS3" for the D3COLD device.
And old kernel also believes the device has "_PS3" is a
D3COLD device.

So, add some logics for supporting D3 COLD device for old BIOS
which is compatible with earlier ACPI spec.

Signed-off-by: Ken Xue <Ken.Xue@....com>
Reported-and-tested-by: Gang Long <Gang.Long@....com>

---
 drivers/acpi/scan.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 01136b8..85c16bb 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -979,7 +979,9 @@ static void acpi_bus_get_power_flags(struct acpi_device *device)
 		acpi_bus_init_power_state(device, i);
 
 	INIT_LIST_HEAD(&device->power.states[ACPI_STATE_D3_COLD].resources);
-	if (!list_empty(&device->power.states[ACPI_STATE_D3_HOT].resources))
+	if (!list_empty(&device->power.states[ACPI_STATE_D3_HOT].resources) ||
+		((acpi_gbl_FADT.header.revision < 6) &&
+		device->power.states[ACPI_STATE_D3_HOT].flags.explicit_set))
 		device->power.states[ACPI_STATE_D3_COLD].flags.valid = 1;
 
 	/* Set defaults for D0 and D3hot states (always valid) */
-- 
1.9.1





--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ