From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basealt.ru; s=dkim; t=1772188378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=skR1/U/DMcaeIYwh1Vs2h//FgEPNWoOIpOmVMwQrTj8=; b=NGsQICBN6xXUjAY0leMUueMPU9OzLdLjx/PD05pO5eb6xjzlE+ijhAijK4YjR+GWkyfWpT uFkbjk0K4m8UQhCAgPRYwMuNjjcSyLUksIk4/5gCcWvQf+9rDuOrkHY1VsI4kxPZr/yDCA DYyHBR3MiVPk6teNcZKDgORQyTJcNhT6LotmNIdCNqu/rIb8n3F6b4J4CfQdpdpq7Lx6SC 0iSISOxtr4zEJpc/Ennw8h6ZMIPDpPb8aee5LrNHC7nJWh1gOfr2y9ZRdfTtw1naPg3xHJ 8CBHzJI6crnlS4vymnC/ilbZzioIx/CvLotjlf/t1yzvpiYePgJ/RshEDjI1LA== From: Daniil Gnusarev To: gnusarevda@basealt.ru, devel-kernel@lists.altlinux.org Date: Fri, 27 Feb 2026 14:32:27 +0400 Message-ID: <20260227103236.785736-27-gnusarevda@basealt.ru> X-Mailer: git-send-email 2.42.2 In-Reply-To: <20260227103236.785736-1-gnusarevda@basealt.ru> References: <20260227103236.785736-1-gnusarevda@basealt.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [d-kernel] [PATCH 26/35] pm: disable all sleep states on Baikal-M based boards X-BeenThere: devel-kernel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux kernel packages development List-Id: ALT Linux kernel packages development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2026 10:33:21 -0000 Archived-At: List-Archive: List-Post: From: Alexey Sheplyakov These days desktop environments try to put computer into a sleep state after a certain period of inactivity. TF307 board is able to enter a sleep state, however it does *NOT* wakeup via power button or keyboard/mouse. Apparently the only wakeup sources on TF307 board are - Real time clock (RTC) - Ethernet Surprisingly BMC (board management controller) is NOT a wakeup source. Also tp_bmc driver does not use interrupts, and polls the device instead. Perhaps BMC is unable to generate interrupts at all? To avoid the problem disable all sleep states (including s2idle) on Baikal-M systems Signed-off-by: Alexey Sheplyakov X-DONTUPSTREAM X-feature-Baikal-M --- kernel/power/suspend.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index 3d4ebedad69f6a..f2875a1a5ce469 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "power.h" @@ -257,6 +258,18 @@ EXPORT_SYMBOL_GPL(suspend_valid_only_mem); static bool sleep_state_supported(suspend_state_t state) { +#ifdef CONFIG_OF + if (of_device_is_compatible(of_root, "baikal,baikal-m") || + of_device_is_compatible(of_root, "baikal,bm1000")) { + /* XXX: there are no wakeup sources except RTC and Ethernet + * on BE-M1000 based boards. In other words, no way to wakeup + * system via the keyboard or power button. + * Thus even s2idle is unusable on BE-M1000 systems. + */ + pr_info("%s: no useful wakeup sources on Baikal-M", __func__); + return false; + } +#endif return state == PM_SUSPEND_TO_IDLE || (valid_state(state) && !cxl_mem_active()); } -- 2.42.2