lkml.org 
[lkml]   [2015]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] pvpanic: handle missing _STA correctly
Date
pvpanic was not properly detected when _STA was missing.

ACPI 6.0 April 2015, 6.3.7 _STA (Status)
If a device object (including the processor object) does not have an
_STA object, then OSPM assumes that all of the above bits are set
(i.e., the device is present, enabled, shown in the UI, and
functioning).

Not adhering to the specification made pvpanic dormant under QEMU 2.3.

Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
---
drivers/platform/x86/pvpanic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/platform/x86/pvpanic.c b/drivers/platform/x86/pvpanic.c
index 073a90a63dbc..7b6860333267 100644
--- a/drivers/platform/x86/pvpanic.c
+++ b/drivers/platform/x86/pvpanic.c
@@ -95,8 +95,7 @@ static int pvpanic_add(struct acpi_device *device)
acpi_status status;
u64 ret;

- status = acpi_evaluate_integer(device->handle, "_STA", NULL,
- &ret);
+ status = acpi_bus_get_status_handle(device->handle, &ret);

if (ACPI_FAILURE(status) || (ret & 0x0B) != 0x0B)
return -ENODEV;
--
2.4.2


\
 
 \ /
  Last update: 2015-05-29 23:01    [W:0.057 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site