From 1846458586825ecc9f2eb5fbcaa53b9f93f861e0 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Tue, 1 Dec 2026 17:44:40 +1100 Subject: [PATCH] PM: sleep: don't log a prepare -EAGAIN skip as an error dpm_prepare() treats -EAGAIN from device_prepare() as "skip this device": it clears the error and carries on with the suspend. But device_prepare() still reports it through suspend_report_result(), at error level. dwc3-apple returns -EAGAIN from its prepare when it has made itself a syscore device for the sleep, after genpd has counted the prepare, so that genpd unwinds prepared_count. Every s2idle on every Mac with that controller therefore logs, once per port: dwc3-apple 402280000.usb: PM: device_prepare(): genpd_prepare returns -11 The suspend goes on. Nothing failed, but the line reads like a failure and keeps coming up in sleep triage. Log the -EAGAIN skip at debug level and keep the error report for real failures. Signed-off-by: Ryan Murray --- drivers/base/power/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index e130da4281410..fac092cb55886 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -2247,7 +2247,11 @@ static int device_prepare(struct device *dev, pm_message_t state) device_unlock(dev); if (ret < 0) { - suspend_report_result(dev, callback, ret); + /* dpm_prepare() skips a device that returns -EAGAIN: not an error. */ + if (ret == -EAGAIN) + dev_dbg(dev, "%s(): %ps skipped the device\n", __func__, callback); + else + suspend_report_result(dev, callback, ret); pm_runtime_unblock(dev); pm_runtime_put(dev); return ret;