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

Merge branch 'acpi-bus'

* acpi-bus:
  ACPI: Pass the same capabilities to the _OSC regardless of the query flag
parents f1ffa9d4 159d8c27
Loading
Loading
Loading
Loading
+8 −19
Original line number Diff line number Diff line
@@ -330,32 +330,21 @@ static void acpi_bus_osc_negotiate_platform_control(void)
	if (ACPI_FAILURE(acpi_run_osc(handle, &context)))
		return;

	capbuf_ret = context.ret.pointer;
	if (context.ret.length <= OSC_SUPPORT_DWORD) {
	kfree(context.ret.pointer);
		return;
	}

	/*
	 * Now run _OSC again with query flag clear and with the caps
	 * supported by both the OS and the platform.
	 */
	/* Now run _OSC again with query flag clear */
	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)))
		return;

	capbuf_ret = context.ret.pointer;
	if (context.ret.length > OSC_SUPPORT_DWORD) {
	osc_sb_apei_support_acked =
		capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_APEI_SUPPORT;
	osc_pc_lpi_support_confirmed =
		capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_PCLPI_SUPPORT;
	osc_sb_native_usb4_support_confirmed =
		capbuf_ret[OSC_SUPPORT_DWORD] & OSC_SB_NATIVE_USB4_SUPPORT;
	}

	kfree(context.ret.pointer);
}