Commit 0aa0282a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ACPI fixes from Rafael Wysocki:
 "These fix three assorted issues, including one recent regression:

   - Add an ACPI IRQ override quirk for Eluktronics MECH-17 to make the
     internal keyboard work (Gannon Kolding)

   - Make acpi_data_prop_read() reflect the OF counterpart behavior in
     error cases (Andy Shevchenko)

   - Remove recently added strict ACPI PRM handler address checks that
     prevented PRM from working on some platforms in the field (Aubrey
     Li)"

* tag 'acpi-6.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: PRM: Remove unnecessary strict handler address checks
  ACPI: resource: IRQ override for Eluktronics MECH-17
  ACPI: property: Fix return value for nval == 0 in acpi_data_prop_read()
parents 78b2a232 3e3e377d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -287,9 +287,7 @@ static acpi_status acpi_platformrt_space_handler(u32 function,
		if (!handler || !module)
			goto invalid_guid;

		if (!handler->handler_addr ||
		    !handler->static_data_buffer_addr ||
		    !handler->acpi_param_buffer_addr) {
		if (!handler->handler_addr) {
			buffer->prm_status = PRM_HANDLER_ERROR;
			return AE_OK;
		}
+5 −5
Original line number Diff line number Diff line
@@ -1187,8 +1187,6 @@ static int acpi_data_prop_read(const struct acpi_device_data *data,
		}
		break;
	}
	if (nval == 0)
		return -EINVAL;

	if (obj->type == ACPI_TYPE_BUFFER) {
		if (proptype != DEV_PROP_U8)
@@ -1212,9 +1210,11 @@ static int acpi_data_prop_read(const struct acpi_device_data *data,
		ret = acpi_copy_property_array_uint(items, (u64 *)val, nval);
		break;
	case DEV_PROP_STRING:
		ret = acpi_copy_property_array_string(
			items, (char **)val,
			min_t(u32, nval, obj->package.count));
		nval = min_t(u32, nval, obj->package.count);
		if (nval == 0)
			return -ENODATA;

		ret = acpi_copy_property_array_string(items, (char **)val, nval);
		break;
	default:
		ret = -EINVAL;
+6 −0
Original line number Diff line number Diff line
@@ -563,6 +563,12 @@ static const struct dmi_system_id irq1_edge_low_force_override[] = {
			DMI_MATCH(DMI_BOARD_NAME, "RP-15"),
		},
	},
	{
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Eluktronics Inc."),
			DMI_MATCH(DMI_BOARD_NAME, "MECH-17"),
		},
	},
	{
		/* TongFang GM6XGxX/TUXEDO Stellaris 16 Gen5 AMD */
		.matches = {