Commit bc8865ab authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'acpi-bus'

* acpi-bus:
  ACPI: Pass the same capabilities to the _OSC regardless of the query flag
parents f1ffa9d4 159d8c27
...@@ -330,32 +330,21 @@ static void acpi_bus_osc_negotiate_platform_control(void) ...@@ -330,32 +330,21 @@ static void acpi_bus_osc_negotiate_platform_control(void)
if (ACPI_FAILURE(acpi_run_osc(handle, &context))) if (ACPI_FAILURE(acpi_run_osc(handle, &context)))
return; return;
capbuf_ret = context.ret.pointer; kfree(context.ret.pointer);
if (context.ret.length <= OSC_SUPPORT_DWORD) {
kfree(context.ret.pointer);
return;
}
/* /* Now run _OSC again with query flag clear */
* Now run _OSC again with query flag clear and with the caps
* supported by both the OS and the platform.
*/
capbuf[OSC_QUERY_DWORD] = 0; capbuf[OSC_QUERY_DWORD] = 0;
capbuf[OSC_SUPPORT_DWORD] = capbuf_ret[OSC_SUPPORT_DWORD];
kfree(context.ret.pointer);
if (ACPI_FAILURE(acpi_run_osc(handle, &context))) if (ACPI_FAILURE(acpi_run_osc(handle, &context)))
return; return;
capbuf_ret = context.ret.pointer; capbuf_ret = context.ret.pointer;
if (context.ret.length > OSC_SUPPORT_DWORD) { osc_sb_apei_support_acked =
osc_sb_apei_support_acked = capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_APEI_SUPPORT;
capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_APEI_SUPPORT; osc_pc_lpi_support_confirmed =
osc_pc_lpi_support_confirmed = capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_PCLPI_SUPPORT;
capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_PCLPI_SUPPORT; osc_sb_native_usb4_support_confirmed =
osc_sb_native_usb4_support_confirmed = capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_NATIVE_USB4_SUPPORT;
capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_NATIVE_USB4_SUPPORT;
}
kfree(context.ret.pointer); kfree(context.ret.pointer);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment