[PATCH]: ACPI : Set 32bit and 64bit waking vector in FCAS table

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

 



Subject: ACPI : Set 32bit and 64bit waking vector in FCAS table
From: Zhao Yakui <yakui.zhao@xxxxxxxxx>

    On some laptops only the 64bit waking vecotr is set for ACPI 2.0 FACS.
But when the system is resumed, BIOS will transfer control directly to 
32bit waking vector. In such case the system can't be resumed correctly.
    Maybe it will be more appropriate that both the 32bit and 64bit waking 
vector will be set for the ACPI 2.0 FACS when the system enters the S3 
sleeping state.

 http://bugzilla.kernel.org/show_bug.cgi?id=11368

Signed-off-by: Zhao Yakui <yakui.zhao@xxxxxxxxx>
Signed-off-by: Zhang Rui <rui.zhang@xxxxxxxxx>
---
 drivers/acpi/hardware/hwsleep.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Index: linux-2.6/drivers/acpi/hardware/hwsleep.c
===================================================================
--- linux-2.6.orig/drivers/acpi/hardware/hwsleep.c
+++ linux-2.6/drivers/acpi/hardware/hwsleep.c
@@ -80,14 +80,14 @@ acpi_set_firmware_waking_vector(acpi_phy
 
 	/* Set the vector */
 
-	if ((facs->length < 32) || (!(facs->xfirmware_waking_vector))) {
-		/*
-		 * ACPI 1.0 FACS or short table or optional X_ field is zero
-		 */
-		facs->firmware_waking_vector = (u32) physical_address;
-	} else {
+	/* 32 Bit wakeing vector is always set */
+	facs->firmware_waking_vector = (u32) physical_address;
+
+	if (facs->length >= 32) {
 		/*
-		 * ACPI 2.0 FACS with valid X_ field
+		 * ACPI 2.0 FACS with the valid X_filed. Its length
+		 * will be more than 32 bytes. In such case the 64 bit
+		 * waking vector is also set.
 		 */
 		facs->xfirmware_waking_vector = physical_address;
 	}


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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