From nobody Sat Jul 25 00:13:37 2026 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90CB6388890 for ; Tue, 21 Jul 2026 19:32:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662340; cv=none; b=pxg+g5CDPLJ4IqsKCy+s0spoEEC4KTClSqJyKP/XmAnwP8sarBdNhEJuS28q6o9BvZvuJ+cOPLqZ/B6dtUtKThRiskdn6CzynNgiqxUP9rO5Lips4FVIbQT/NURXCYDHUPi2E3dPcjizSgC5RqvMMyFMklgA/abNr9Uvs43YqCU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784662340; c=relaxed/simple; bh=ebiu9YEQbXkOUWJIAEBHloa+6lFq4cUZAbjxjNgOz5g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=g5TOcl4N4lJDQ+Xx3dpkhnIbXPQu2aVPcBhf+gOXb3uyXwp+uajoFVkKNeM71Y2AiMEIU6HaSmJICNKFdH6l9Httkt2oIdyI2aAKxSxtVRAs2Dz0MItU20C68muhKD9ITD2PC4McyWWkwXQrcMgwIYdRRIXF18MpZSKYiJ8Hjuc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YiBU/zl+; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YiBU/zl+" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-493f6de72faso36960415e9.0 for ; Tue, 21 Jul 2026 12:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784662337; x=1785267137; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=KW2NvbPcpsJ4x/MthRN20VzLSnOiLA7Uw1JEXiIhMQg=; b=YiBU/zl+XCTYu43XgiUGqKitfPQBDl9W2yf+6LlQXJOS8sLRf/wqvME/cXUUmhCrKw ND/ohyiK6oKjCJVVMxYQ+pq6WCao03jM4cfSPQVYeOi2lDsFelD12AGxD+JMALGxwJJ6 N6nkhkCw2jG+gMtYEbOouo50ilxsec6T0SrfpOsyvL25/o4ZTgi59X+M+93xshSd0ITp gKt+DRHv25BYbBMcSEXOsngHCQEFemgvSvcoRCJA67j0LkwbOobmqqJzZVgPau9vcRyz iZ81O25x2XnxqcXp9rfnaONMi0AGH2hh5ElMco4N7vxKlLa4eVKtBaExTzaFIC92jpsk YFmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784662337; x=1785267137; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=KW2NvbPcpsJ4x/MthRN20VzLSnOiLA7Uw1JEXiIhMQg=; b=q2jXSZWPBb1yUJupR5tDSI/w4CAVZsjBTJR1QJcC7t2rBZXqdWdpfzSb5tMEMoa8KP sQsZY/jju4SHXRZLBkB0xUp+Kw5Rx9TXbjFJHKP7wrCCQBiwkKYn/WZi7lNI9Wu6GR9c zcBT3iqFf1TIJXD02WgLjtQ0+Qe56jI+XpumC4JP5UzX2kHeeYjAvrV+vRB6e2wjqTXG FvvVjTauunxCg75ZsdQClNJdFTvKMqChwrCPiVfPYuiNQpPGaXa6XmV635+0m+uvtagp 3uRYlysnvKUZ5eA5tA8JBsRPuyn/5Kd78uu0zdnlOhvdE3QdPQYxid7qNzax3/C97r/G FcPw== X-Forwarded-Encrypted: i=1; AHgh+RrwwhiU0z57vFbRNMUU0SNG22bWtzuPPT7xQS1M16gASuaIA+x50wtWfUWvkhGpbzkuv9s0SI+Nz8Hyjx4=@vger.kernel.org X-Gm-Message-State: AOJu0Yz1NGx8QuG4p2FfV36+xHb6aaxUT8e/2CqrigF1dpdhIh24/XPH wm7FfCjriDp+FOlKd/8MhxPH4D2IfVCsxPMkSMXXu28W0KEt6RZPVJmN X-Gm-Gg: AfdE7ck+zw0sNAzjD1j5uGRvePzEj1t8RmoFjjsHGuRJ+jwYR+Vkh7T2JBBF0w9KiUc WJZF8dl3ugREGMx0Gxao2b/HLbl7Upxxn/yFDXPe9Ck8o1mb+O+js80KB8LuajdWKT5rcjRgvQf 45vBt3VWiEMmQPh6XqZkDxVd+30ujUyJTCWOMifZIj0tESO/rNlDvwoFO24qSkqyb+lp+hNoeFR BP9htyZ75M/KdrI9X1Ddn++BUTGL3AVb7248FvsGykrj/VeNLyaijY2fk0S45D9+i4NPXtWi5Yf w9kLpxGF//YPqBOlrtozkziYPHUnVCdTNrHXh9QLiN+YxL295lqFWtar7W6DFYUDKEUApH73s5o DEkW98k8gtvN0Qf0vq0YRFNT/urm9V1OJLUmb7+rdpgIQSMLyYIfGG//MfTJx90ix18owzhAtjZ egPeQocWgORCPP6gzlFeubnEEVxC+c4dagvL3hlBT/7qVtq9SW26oFpG3m/5U9ZLReqaE5KyC3 X-Received: by 2002:a05:600c:3510:b0:493:b4a3:5ab0 with SMTP id 5b1f17b1804b1-4956a50fd4cmr9873585e9.13.1784662336456; Tue, 21 Jul 2026 12:32:16 -0700 (PDT) Received: from c64.fritz.box (p200301048f0fe900a0f9605663da8872.dip0.t-ipconnect.de. [2003:104:8f0f:e900:a0f9:6056:63da:8872]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4956b021fa6sm2319195e9.2.2026.07.21.12.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2026 12:32:14 -0700 (PDT) From: Saverio Miroddi To: "Rafael J . Wysocki" Cc: Len Brown , Jonathan Cameron , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Saverio Miroddi Subject: [PATCH] ACPI: bus: Avoid misleading _OSC missing-feature errors Date: Tue, 21 Jul 2026 21:29:14 +0200 Message-ID: <20260721192914.1166891-1-saverio.pub2@gmail.com> X-Mailer: git-send-email 2.54.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The ACPI specification defines OSC_CAPABILITIES_MASK_ERROR to mean that firmware cleared capability bits requested by the operating system. Some firmware sets this status during the control request while returning every requested capability unchanged. On the affected system, the requested and returned masks were both 0x006a7eff. Commit e5322888e6bf ("ACPI: bus: Rework the handling of \_SB._OSC platform features") made all control-response errors produce error-level messages. Consequently, the inconsistent response above now claims that features may be missing even though none were removed. Track whether the response actually clears a requested bit and omit the error-level messages only if OSC_CAPABILITIES_MASK_ERROR is the sole error and no capability was cleared. Keep the dynamic-debug diagnostic and leave the negotiated capability mask and all other error cases unchanged. Fixes: e5322888e6bf ("ACPI: bus: Rework the handling of \_SB._OSC platform = features") Signed-off-by: Saverio Miroddi --- drivers/acpi/bus.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index a30a904f6535..c13128cbc2f6 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -335,7 +335,8 @@ static int acpi_osc_handshake(acpi_handle handle, const= char *uuid_str, .length =3D bufsize * sizeof(u32), }; struct acpi_buffer output; - u32 *retbuf, test; + u32 *retbuf, test, errors; + bool capabilities_masked =3D false; guid_t guid; int ret, i; =20 @@ -395,16 +396,24 @@ static int acpi_osc_handshake(acpi_handle handle, con= st char *uuid_str, * Clear the feature bits in capbuf[] that have not been acknowledged. * After that, capbuf[] contains the resultant feature mask. */ - for (i =3D OSC_QUERY_DWORD + 1; i < bufsize; i++) + for (i =3D OSC_QUERY_DWORD + 1; i < bufsize; i++) { + if (capbuf[i] & ~retbuf[i]) + capabilities_masked =3D true; + capbuf[i] &=3D retbuf[i]; + } =20 - if (retbuf[OSC_QUERY_DWORD] & OSC_ERROR_MASK) { + errors =3D retbuf[OSC_QUERY_DWORD] & OSC_ERROR_MASK; + if (errors) { /* - * Complain about the unexpected errors and print diagnostic - * information related to them. + * Some firmware sets OSC_CAPABILITIES_MASK_ERROR without clearing + * any requested capability. Only complain if another error is + * present or a capability was actually masked. */ - acpi_handle_err(handle, "_OSC: errors while processing control request\n= "); - acpi_handle_err(handle, "_OSC: some features may be missing\n"); + if (errors !=3D OSC_CAPABILITIES_MASK_ERROR || capabilities_masked) { + acpi_handle_err(handle, "_OSC: errors while processing control request\= n"); + acpi_handle_err(handle, "_OSC: some features may be missing\n"); + } acpi_osc_error_check(handle, &guid, rev, &cap, retbuf); } =20 --=20 2.54.0