From nobody Wed Oct 02 18:31:12 2024 X-Original-To: acpi@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJk0K10Znz5XvBc for ; Wed, 02 Oct 2024 18:31:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJk0J68r8z4Nyg for ; Wed, 2 Oct 2024 18:31:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727893872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qtdzjfbPwY98dso9XfxLHWsdqnx0FErU2Nn1f6gbNco=; b=sU8j5KRrjfYLWgOn1W/bCeqW+P466hehuRLg3nWhJJNtsGwlV0+/cUGJhaWn/JyBOB+pC4 kGHUzELfuHxVrsKVlGdY0OUhWgF4zEMVRYKAs4b+BzwxY0cyFjnrAXA3vwUEDVcSmyv/+e jcoT4eMPrdB6UWbxJwO/tY57LqAIHh5jO2aJd3ztrYHhFG8aY8gOz+xxxUAaA3OvG1M9P5 EdSxOg346dankv53eSrILE0jaWlZx5mFcDD1p/ccrO2BusDVjqtpgYV7Fz1L62jLIKfPNM WhQQUnwI2wsiCVYmApRX7hkv9MsQMw9jTTHlYnsvFfY9hyFo44okGOnfK3OPuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727893872; a=rsa-sha256; cv=none; b=ogs1ldlU4s29m1udFW1zIbf9rhy/JILAzsoNXPLoyBdl8NRSiLAmQh3abLKisFhDglpa6L NF/roG3AyfJWcbuHyCE/+asO3x9JaI6r4g8NlzZymI5lh0Mtk9sLfDzHPOgMpJ4XO9UtoX FJyDTXsvAPeYmV+iZx4xNaK/0ImuiHmsvvS/s7GX2Vxatd3jMisw14v/YVpVGFpMVQ5f1t TVRXoAS7JeDST801tUJzxcfBDMe5/2iwh6qj5FsbHnM9lYcqv0d5S0rZ58bvMimYQXWmjW l08+SclBJ8RdX9NOzAPCAf/Yk/vBAZL0WTntafIf41DY9wMObUJitZfV/Lx6+w== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJk0J5X7VzHD5 for ; Wed, 2 Oct 2024 18:31:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 492IVCZp074410 for ; Wed, 2 Oct 2024 18:31:12 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 492IVCQY074409 for acpi@FreeBSD.org; Wed, 2 Oct 2024 18:31:12 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: acpi@FreeBSD.org Subject: [Bug 252030] No battery reading after upgrade to 12.2-RELEASE Fujitsu lifebook s936 Date: Wed, 02 Oct 2024 18:31:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 12.2-RELEASE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: acpi@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: ACPI and power management development List-Archive: https://lists.freebsd.org/archives/freebsd-acpi List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-acpi@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252030 --- Comment #7 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dcd8c3af747cc300c8257c315c7576644e= 2bb86ff commit cd8c3af747cc300c8257c315c7576644e2bb86ff Author: Bartosz Fabianowski AuthorDate: 2024-10-02 18:21:28 +0000 Commit: Warner Losh CommitDate: 2024-10-02 18:30:15 +0000 ACPI: Treat all 20-element _BIX entires as revision 0 Some Fujitsu Lifebooks return an invalid _BIX object. The first element of _BIX is a revision number, which indicates what elements will follow: * ACPI 4.0 defined _BIX revision 0 with 20 elements. * ACPI 6.0 introduced _BIX revision 1 with 21 elements. The problem is that the offending Lifebooks have the a non-zero _BIX revision, but provide 20 fields only. The ACPICA parser chokes on this [1], but that seems to be inconsequential. More importantly, our own battery info handling code also verifies that for revision > 0, there are at least 21 fields - and refuses to process the invalid _BIX. One workaround would be to introduce special case / quirk handling for Fujitsu Lifebooks. A better one is to relax the requirements check: If there are only 20 elements, treat the _BIX as revision 0, no matter what revision number was provided by the device. Linux doesn't run into this problem by the way because it only supports the 20 fields defined in the ACPI 4.0 spec [3]. It never looks at the revision number or the 21st field added in ACPI 6.0. [1] https://cgit.freebsd.org/src/tree/sys/contrib/dev/acpica/components/namespa= ce/nsprepkg.c#n815 [2] https://cgit.freebsd.org/src/tree/sys/dev/acpica/acpi_cmbat.c#n371 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/dri= vers/acpi/battery.c#n418 PR: 252030 Reviewed by: imp MFC After: 2 weeks sys/dev/acpica/acpi_cmbat.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=