Skip to content

Commit f2cba54

Browse files
HW42rafaeljw
authored andcommitted
ACPI: s2idle: Log when enabling wakeup IRQ fails
enable_irq_wake() can fail. Previously acpi_s2idle_prepare() silently ignored it's return code. Based on [1] we should try to continue even in case of an error, so just log a warning for now. Discovered when trying to go into s2idle under Xen. This leads to a system that can't be woken, since xen-pirq currently doesn't support setting wakeup IRQs [2]. With this you get at least some helpful log message if you have access to console messages. Link: https://lore.kernel.org/linux-acpi/20230313125344.2893-1-simon@invisiblethingslab.com/ # v1 Link: https://lore.kernel.org/linux-acpi/CAJZ5v0jahjt58nP6P5+xRdtD_ndYPvq4ecMVz6nfGu9tf5iaUw@mail.gmail.com/ # [1] Link: https://lore.kernel.org/xen-devel/20230313134102.3157-1-simon@invisiblethingslab.com/ # [2] Signed-off-by: Simon Gaiser <simon@invisiblethingslab.com> [ rjw: Adjust white space ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent e8d018d commit f2cba54

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/acpi/sleep.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,13 @@ int acpi_s2idle_begin(void)
714714
int acpi_s2idle_prepare(void)
715715
{
716716
if (acpi_sci_irq_valid()) {
717-
enable_irq_wake(acpi_sci_irq);
717+
int error;
718+
719+
error = enable_irq_wake(acpi_sci_irq);
720+
if (error)
721+
pr_warn("Warning: Failed to enable wakeup from IRQ %d: %d\n",
722+
acpi_sci_irq, error);
723+
718724
acpi_ec_set_gpe_wake_mask(ACPI_GPE_ENABLE);
719725
}
720726

0 commit comments

Comments
 (0)