Skip to contentSkip to conversation

pvpanic: handle missing _STA correctly

PATCH Applied Radim Krčmář 3 participants 3 messages May 29, 2015 – Jun 1, 2015 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pvpanic: handle missing _STA correctly

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.

---
 drivers/platform/x86/pvpanic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/x86/pvpanic.c +1 -2
index 073a90a63dbc..7b6860333267 100644
@@ -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;
Signature · 1 line
2.4.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · On Fri, 29 May 2015 22:18:52 +0200 Radim Krčmář <[email protected]> wrote:

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).

Quoted 4 lines

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

Quoted 18 lines
---
 drivers/platform/x86/pvpanic.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/platform/x86/pvpanic.c +1 -2
index 073a90a63dbc..7b6860333267 100644
@@ -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;
Applied
#2 lore raw

Re: [PATCH] pvpanic: handle missing _STA correctly'

Quoted 11 lines · Igor Mammedov
Quoted 8 lines · On Fri, 29 May 2015 22:18:52 +0200 Radim Krčmář <[email protected]> wrote:

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).

Quoted 5 lines
Quoted 4 lines

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

Queued, thanks.

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center