All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: David McFarland <corngood@gmail.com>
Cc: linux-pm@vger.kernel.org,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"platform-driver-x86@vger.kernel.org"
	<platform-driver-x86@vger.kernel.org>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	"Enrik Berkhan" <Enrik.Berkhan@inka.de>
Subject: Re: [PATCH v2] platform/x86/intel/hid: Don't wake on 5-button releases
Date: Thu, 4 Apr 2024 20:35:56 +0200	[thread overview]
Message-ID: <919c6143-79be-4adf-8f51-53ebcc454773@redhat.com> (raw)
In-Reply-To: <878r1tpd6u.fsf_-_@gmail.com>

Hi,

On 4/4/24 1:41 PM, David McFarland wrote:
> If, for example, the power button is configured to suspend, holding it
> and releasing it after the machine has suspended, will wake the machine.
> 
> Also on some machines, power button release events are sent during
> hibernation, even if the button wasn't used to hibernate the machine.
> This causes hibernation to be aborted.
> 
> Fixes: 0c4cae1bc00d ("PM: hibernate: Avoid missing wakeup events during hibernation")
> Signed-off-by: David McFarland <corngood@gmail.com>
> Tested-by: Enrik Berkhan <Enrik.Berkhan@inka.de>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Thank you, this version looks good to me.

Ilpo, can you pick this up as a bug-fix for the 6.9 cycle please?

Regards,

Hans



> ---
> v2: Added tags and fixed whitespace, as requested by Hans.
> 
>  drivers/platform/x86/intel/hid.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c
> index 7457ca2b27a6..9ffbdc988fe5 100644
> --- a/drivers/platform/x86/intel/hid.c
> +++ b/drivers/platform/x86/intel/hid.c
> @@ -504,6 +504,7 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
>  	struct platform_device *device = context;
>  	struct intel_hid_priv *priv = dev_get_drvdata(&device->dev);
>  	unsigned long long ev_index;
> +	struct key_entry *ke;
>  	int err;
>  
>  	/*
> @@ -545,11 +546,15 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
>  		if (event == 0xc0 || !priv->array)
>  			return;
>  
> -		if (!sparse_keymap_entry_from_scancode(priv->array, event)) {
> +		ke = sparse_keymap_entry_from_scancode(priv->array, event);
> +		if (!ke) {
>  			dev_info(&device->dev, "unknown event 0x%x\n", event);
>  			return;
>  		}
>  
> +		if (ke->type == KE_IGNORE)
> +			return;
> +
>  wakeup:
>  		pm_wakeup_hard_event(&device->dev);
>  


  reply	other threads:[~2024-04-04 18:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 19:11 [PATCH 0/1] Failure to hibernate on Dell Latitude 7430 David McFarland
2024-03-18 19:11 ` [PATCH 1/1] platform/x86/intel/hid: Don't wake on 5-button releases David McFarland
2024-03-29 13:51   ` Linux regression tracking (Thorsten Leemhuis)
2024-03-29 18:06     ` David McFarland
2024-03-30  6:54       ` Linux regression tracking (Thorsten Leemhuis)
2024-04-01 15:36     ` Enrik Berkhan
2024-04-02 11:36   ` Hans de Goede
2024-04-04 11:41     ` [PATCH v2] " David McFarland
2024-04-04 18:35       ` Hans de Goede [this message]
2024-04-08 15:42       ` Ilpo Järvinen
2024-03-21  9:31 ` [PATCH 0/1] Failure to hibernate on Dell Latitude 7430 Linux regression tracking (Thorsten Leemhuis)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=919c6143-79be-4adf-8f51-53ebcc454773@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=Enrik.Berkhan@inka.de \
    --cc=corngood@gmail.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.