Skip to content

Commit 58e20d8

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI: ignore bit0 of _OSC return code
2 parents 7b42365 + 2485b86 commit 58e20d8

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

‎drivers/pci/pci-acpi.c‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static acpi_status acpi_run_osc(acpi_handle handle,
6363
union acpi_object in_params[4];
6464
struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
6565
union acpi_object *out_obj;
66-
u32 osc_dw0, flags = osc_args->capbuf[OSC_QUERY_TYPE];
66+
u32 errors, flags = osc_args->capbuf[OSC_QUERY_TYPE];
6767

6868
/* Setting up input parameters */
6969
input.count = 4;
@@ -92,15 +92,16 @@ static acpi_status acpi_run_osc(acpi_handle handle,
9292
status = AE_TYPE;
9393
goto out_kfree;
9494
}
95-
osc_dw0 = *((u32 *)out_obj->buffer.pointer);
96-
if (osc_dw0) {
97-
if (osc_dw0 & OSC_REQUEST_ERROR)
95+
/* Need to ignore the bit0 in result code */
96+
errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0);
97+
if (errors) {
98+
if (errors & OSC_REQUEST_ERROR)
9899
printk(KERN_DEBUG "_OSC request fails\n");
99-
if (osc_dw0 & OSC_INVALID_UUID_ERROR)
100+
if (errors & OSC_INVALID_UUID_ERROR)
100101
printk(KERN_DEBUG "_OSC invalid UUID\n");
101-
if (osc_dw0 & OSC_INVALID_REVISION_ERROR)
102+
if (errors & OSC_INVALID_REVISION_ERROR)
102103
printk(KERN_DEBUG "_OSC invalid revision\n");
103-
if (osc_dw0 & OSC_CAPABILITIES_MASK_ERROR) {
104+
if (errors & OSC_CAPABILITIES_MASK_ERROR) {
104105
if (flags & OSC_QUERY_ENABLE)
105106
goto out_success;
106107
printk(KERN_DEBUG "_OSC FW not grant req. control\n");

0 commit comments

Comments
 (0)