Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9350de06 authored by Bernie Thompson's avatar Bernie Thompson Committed by Rafael J. Wysocki
Browse files

PM / wakeup: Adjust messaging for wake events during suspend



This adds in a new message to the wakeup code which adds an
indication to the log that suspend was cancelled due to a wake event
occouring during the suspend sequence. It also adjusts the message
printed in suspend.c to reflect the potential that a suspend was
aborted, as opposed to a device failing to suspend.

Without these message adjustments one can end up with a kernel log
that says that a device failed to suspend with no actual device
suspend failures, which can be confusing to the log examiner.

Signed-off-by: default avatarBernie Thompson <bhthompson@chromium.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 43d51af4
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -707,8 +707,10 @@ bool pm_wakeup_pending(void)
	}
	}
	spin_unlock_irqrestore(&events_lock, flags);
	spin_unlock_irqrestore(&events_lock, flags);


	if (ret)
	if (ret) {
		pr_info("PM: Wakeup pending, aborting suspend\n");
		print_active_wakeup_sources();
		print_active_wakeup_sources();
	}


	return ret;
	return ret;
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -269,7 +269,7 @@ int suspend_devices_and_enter(suspend_state_t state)
	suspend_test_start();
	suspend_test_start();
	error = dpm_suspend_start(PMSG_SUSPEND);
	error = dpm_suspend_start(PMSG_SUSPEND);
	if (error) {
	if (error) {
		printk(KERN_ERR "PM: Some devices failed to suspend\n");
		pr_err("PM: Some devices failed to suspend, or early wake event detected\n");
		goto Recover_platform;
		goto Recover_platform;
	}
	}
	suspend_test_finish("suspend devices");
	suspend_test_finish("suspend devices");