lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <468babfa-bc4c-4ca9-8649-207576ef7df4@linux.intel.com>
Date: Mon, 12 Jan 2026 18:51:08 -0800
From: Xi Pardee <xi.pardee@...ux.intel.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>,
 Linux ACPI <linux-acpi@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux PM <linux-pm@...r.kernel.org>,
 Todd Brandt <todd.e.brandt@...ux.intel.com>
Subject: Re: [PATCH v1 2/2] ACPI: scan: Use acpi_setup_gpe_for_wake() for
 buttons

This patch fixes the suspend failing regression caused by a recent ACPI 
changes
in intelnext kernel. I tested this patch on Panther Lake platform and it 
can suspend
and resume successfully with this patch.

Tested-by: Xi Pardee <xi.pardee@...ux.intel.com>

On 1/10/2026 3:58 AM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>
> After starting to use platform devices for representing buttons
> enumerated via ACPI, acpi_mark_gpe_for_wake() is insufficient for
> preparing their GPEs to wake up the system from sleep because it
> does not change the "dispatch type" of the given GPE to
> ACPI_GPE_DISPATCH_NOTIFY.  Subsequently, this causes acpi_enable_gpe()
> in __acpi_device_wakeup_enable() to fail and system suspend transitions
> to be aborted.
>
> Address this by updating acpi_wakeup_gpe_init() to use
> acpi_setup_gpe_for_wake() for buttons like for any other devices.
>
> This allows acpi_setup_gpe_for_wake() to be simplified further because
> buttons are not a special case in it any more, so do that as well.
>
> Fixes: 52d864019636 ("ACPI: button: Convert the driver to a platform one")
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
>   drivers/acpi/scan.c |   18 ++++--------------
>   1 file changed, 4 insertions(+), 14 deletions(-)
>
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -999,15 +999,11 @@ static int acpi_bus_extract_wakeup_devic
>   	return err;
>   }
>   
> -/* Do not use a button for S5 wakeup */
> -#define ACPI_AVOID_WAKE_FROM_S5		BIT(0)
> -
>   static bool acpi_wakeup_gpe_init(struct acpi_device *device)
>   {
>   	static const struct acpi_device_id button_device_ids[] = {
> -		{"PNP0C0C", 0},				/* Power button */
> -		{"PNP0C0D", ACPI_AVOID_WAKE_FROM_S5},	/* Lid */
> -		{"PNP0C0E", ACPI_AVOID_WAKE_FROM_S5},	/* Sleep button */
> +		{"PNP0C0D", 0},	/* Lid */
> +		{"PNP0C0E", 0},	/* Sleep button */
>   		{"", 0},
>   	};
>   	struct acpi_device_wakeup *wakeup = &device->wakeup;
> @@ -1016,15 +1012,9 @@ static bool acpi_wakeup_gpe_init(struct
>   
>   	wakeup->flags.notifier_present = 0;
>   
> -	/* Power button, Lid switch always enable wakeup */
>   	match = acpi_match_acpi_device(button_device_ids, device);
> -	if (match) {
> -		if ((match->driver_data & ACPI_AVOID_WAKE_FROM_S5) &&
> -		    wakeup->sleep_state == ACPI_STATE_S5)
> -			wakeup->sleep_state = ACPI_STATE_S4;
> -		acpi_mark_gpe_for_wake(wakeup->gpe_device, wakeup->gpe_number);
> -		return true;
> -	}
> +	if (match && wakeup->sleep_state == ACPI_STATE_S5)
> +		wakeup->sleep_state = ACPI_STATE_S4;
>   
>   	status = acpi_setup_gpe_for_wake(device->handle, wakeup->gpe_device,
>   					 wakeup->gpe_number);
>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ