Commit c86e5b56 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ACPI fixes from Rafael Wysocki:
 "These fix a recent regression in the ACPI button driver, add quirks
  related to EC wakeups from suspend-to-idle and fix coding mistakes
  related to the usage of sizeof() in the PPTT parser code:

  Summary:

   - Add suspend-to-idle EC wakeup quirks for Lenovo Go S (Mario
     Limonciello)

   - Prevent ACPI button from sending spurions KEY_POWER events to user
     space in some cases after a recent update (Mario Limonciello)

   - Compute the size of a structure instead of the size of a pointer in
     two places in the PPTT parser code (Jean-Marc Eurin)"

* tag 'acpi-6.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI PPTT: Fix coding mistakes in a couple of sizeof() calls
  ACPI: EC: Set ec_no_wakeup for Lenovo Go S
  ACPI: button: Only send `KEY_POWER` for `ACPI_BUTTON_NOTIFY_STATUS`
parents 9b03fa10 dcc4aca5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -458,7 +458,7 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
	acpi_pm_wakeup_event(&device->dev);

	button = acpi_driver_data(device);
	if (button->suspended)
	if (button->suspended || event == ACPI_BUTTON_NOTIFY_WAKE)
		return;

	input = button->input;
+28 −0
Original line number Diff line number Diff line
@@ -2301,6 +2301,34 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = {
			DMI_MATCH(DMI_PRODUCT_FAMILY, "103C_5336AN HP ZHAN 66 Pro"),
		},
	},
	/*
	 * Lenovo Legion Go S; touchscreen blocks HW sleep when woken up from EC
	 * https://gitlab.freedesktop.org/drm/amd/-/issues/3929
	 */
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "83L3"),
		}
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "83N6"),
		}
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"),
		}
	},
	{
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"),
		}
	},
	{ },
};

+2 −2
Original line number Diff line number Diff line
@@ -229,7 +229,7 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr,
	node_entry = ACPI_PTR_DIFF(node, table_hdr);
	entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
			     sizeof(struct acpi_table_pptt));
	proc_sz = sizeof(struct acpi_pptt_processor *);
	proc_sz = sizeof(struct acpi_pptt_processor);

	while ((unsigned long)entry + proc_sz < table_end) {
		cpu_node = (struct acpi_pptt_processor *)entry;
@@ -270,7 +270,7 @@ static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_he
	table_end = (unsigned long)table_hdr + table_hdr->length;
	entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,
			     sizeof(struct acpi_table_pptt));
	proc_sz = sizeof(struct acpi_pptt_processor *);
	proc_sz = sizeof(struct acpi_pptt_processor);

	/* find the processor structure associated with this cpuid */
	while ((unsigned long)entry + proc_sz < table_end) {