Patch "platform/x86/intel/hid: Don't wake on 5-button releases" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    platform/x86/intel/hid: Don't wake on 5-button releases

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     platform-x86-intel-hid-don-t-wake-on-5-button-releas.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 54aae6802f6cee97a0d2f2c0b41a01022eee3ef3
Author: David McFarland <corngood@xxxxxxxxx>
Date:   Thu Apr 4 08:41:45 2024 -0300

    platform/x86/intel/hid: Don't wake on 5-button releases
    
    [ Upstream commit 5864e479ca4344f3a5df8074524da24c960f440b ]
    
    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@xxxxxxxxx>
    Tested-by: Enrik Berkhan <Enrik.Berkhan@xxxxxxx>
    Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/878r1tpd6u.fsf_-_@xxxxxxxxx
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c
index 7457ca2b27a60..9ffbdc988fe50 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);
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux