Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1142369lqj; Mon, 3 Jun 2024 11:20:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXEm2YtUkgPwZpDMGjjqH+y+KUpePc/zoqa5G6TA8FMt6DrYIqNT7jmGY9dHciKqPGpW6oX8qTMZ4dnbJfEiM1hmf+ZZn6Ou/+45hKYYA== X-Google-Smtp-Source: AGHT+IEtAv0JdnS44SnOqNEqLHpnvqMsUoHvObf8frJkaLur2eRhpgVhEkIRNnUXopZs8ie8gvyG X-Received: by 2002:a05:6a20:3949:b0:1b0:259e:c8f3 with SMTP id adf61e73a8af0-1b26f28edd5mr11736530637.54.1717438830946; Mon, 03 Jun 2024 11:20:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717438830; cv=pass; d=google.com; s=arc-20160816; b=Siw2H829Wjt7DHGHvyuQ7l+LuLdwwQDYC5jghXMBuoCDT9ZOtb8VlBbdjj2R9zv+LZ i1jDvZDuDechKpGrVW4TYGSbPCZBDgUDFgbk7vpCuJOkEw/P+7doVYuDITAfFHRrX4P/ RBUqjiJU5XjH1ioWfdT67FSLxYPuZx9O4zN+FlEhgmq998mP6Fb4QQapaztnbtInNCpk gpNdbA7Q12wbN75bXp3224NtdW5uU/1uRIP89R305nRpAOgUbDj08w3uhYSlEFOdfJu6 ZeNNvSAEYBjXRszy4d0Cr4a2+MkgumWKcWeU+dFi5CgN/2J4PYEk7OSVT6DTbIkHp779 KISA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=nhmNZMjczhgXcXlyO6batVIbyjBQ+uJyBjBQVdLoaeg=; fh=ji3tRmyCa9K/JjNn4dOAq84taEjOcYfWtNJ+K6+LIQk=; b=SmEo70F1FQ32eqKceYDAt4tafi1PAvwDY3tfi4rW6nI4mRAeIZJePQgOE/dt7qtMf9 THKWidn1yUd5RtmQ1v1E1LwB5UwlRBePsQBZ4RXm+cUHKihP3bOcQ5nUPXvpHTVrsbjP DPYtb+VfWOBHo9qTIfsSPe2Ysfa8pTEWVoygejFETrifznAy1Vnd8lb+2bufX5kJpjQB 579IPcrbHsEm37W5WWlq44GjmoohAmuikmLOEVB4rzi8zCZ6q1yQKgshDdaYvOQLrsW8 jU8tQsBidJvXz8D9bNr8wBqpN2ZksakmXgIrqnK/q8gEQNN5NPWisge99/jT+03sudvr ey6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XDIXIgjh; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-199554-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199554-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c3540fb29dsi7033263a12.58.2024.06.03.11.20.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 11:20:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199554-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XDIXIgjh; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-199554-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199554-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 25ABD285D8E for ; Mon, 3 Jun 2024 18:20:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D18BD13848A; Mon, 3 Jun 2024 18:20:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XDIXIgjh" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFA88137C3C; Mon, 3 Jun 2024 18:20:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717438822; cv=none; b=A+uINyTlmt4UxziqatnpmmfGKaO3p0dhv0Q7etO4z8DgGvYCf5xqTSJleQH7mZi2pvk8pTkMkf1YRFDQt8Qkny6OkdRESKGOaUBNb4YSwd10j73TgkgN88hNwQSTRBJvErl+F0VpiosdynxCjVvImL04Xanj2sYixffhmjyLXs8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717438822; c=relaxed/simple; bh=u5p2ERLEdtn1dk+Iu+J2FcYDM1oNuuTTvuevbuQjkME=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=LYmoGKMUAePeGisZaDRBJDlA3NcnfvroJ3+AIGQi7SfvNTp1jdF9mt64QosDFccDq3mCueJhAEX7yxu2Uy5tpKaJ9Ila0jTwCjP0AlMOcEaTogx1ailuygNi/HEXYfoIVz8EZNw9NFoTXHrTywuAMe2Fpd2ZHb5CfY8+Jx4smMc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XDIXIgjh; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69618C4AF08; Mon, 3 Jun 2024 18:20:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717438822; bh=u5p2ERLEdtn1dk+Iu+J2FcYDM1oNuuTTvuevbuQjkME=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XDIXIgjhzo4DwaJtltdipJapIMsNSwgv9puEH9tlzSihDDtJgwitdQjQAKfLOlW6a SwbrvBcVk6TdP8feMuy0VXPOKvpJAxGzZmqxaLNaTTVUCrIVn11rUKrEpCcfYGo+Wg Wke69cc8FswSmpcjcNrj3QpQ/6lZFTnHBd8/tViqZNpbytXkZpgOEmr8LiprWoLo7D Aw+B8kzDO8/cxxr1/WCVyjscl5bVpyRvcpEdPDYd4bf9jMWAjW2c10Xnzflj+c1T1x iqOF+bxVl2yCYIteOQ1dRRuKlSGVC6zZTuWoJYz8/QL8rW3zLtMUK1msynSDXECQPK BTX8U2fHOW+Bw== Received: by mail-oi1-f180.google.com with SMTP id 5614622812f47-3d1b6b6b2c5so572150b6e.0; Mon, 03 Jun 2024 11:20:22 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXPWQaUcuFR6I3vXE3oXUFNZJKRMuOnzBuAGP515Fu63Zo3RLO0kTuGNhbu8r9HPshno0ITksn51uwcor8fo4mvyBScEf2AuXpW/XHEPQkdeD1uLE2L6z9wfWT5zOtUHHWPXTNY3DyUZQ== X-Gm-Message-State: AOJu0YyPS0XE14QsgrlB8HnhQ3tw0BxWDuC5QyaDcqTJhyaD3/xeao2Z VhMNQEiBCiiI9L4IFtj5Ccf7dgnbR/XeK+t/G1wCrNHNEcEMUazGaMX8FmP6lsrumsmsPJp+J3w 31Lm9irqK1lxV8C5oEIqRDdRUP9A= X-Received: by 2002:a05:6870:36d5:b0:250:7a11:1ef6 with SMTP id 586e51a60fabf-2508bdecdafmr11235936fac.4.1717438821629; Mon, 03 Jun 2024 11:20:21 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240530153727.843378-1-laura.nao@collabora.com> <20240531113534.577055-1-laura.nao@collabora.com> In-Reply-To: <20240531113534.577055-1-laura.nao@collabora.com> From: "Rafael J. Wysocki" Date: Mon, 3 Jun 2024 20:20:10 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [REGRESSION] probe with driver acpi-fan failed with error -22 To: Laura Nao Cc: kernel@collabora.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, rafael@kernel.org, regressions@lists.linux.dev Content-Type: multipart/mixed; boundary="000000000000e387b6061a006270" --000000000000e387b6061a006270 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Fri, May 31, 2024 at 1:35=E2=80=AFPM Laura Nao = wrote: > > Hello, > > On 5/30/24 17:37, Laura Nao wrote: > > Hello, > > > > We have identified a regression in the acpi-fan driver probe between > > v6.9-rc7 and v6.10-rc1 on some Intel Chromebooks in the Collabora LAVA > > lab. > > > > For the Acer Chromebook Spin 514 (CP514-2H), the following error is > > reported in the logs: > > > > [ 0.651202] acpi-fan INTC1044:00: probe with driver acpi-fan failed = with error -22 > > > > Similar errors are reported on other devices with fans compatible with > > the same driver. > > > > On Acer Chromebox CXI4, ASUS Chromebook Flip C436FA and > > HP Chromebook x360 14 G1: > > > > [ 0.488001] acpi-fan INT3404:00: probe with driver acpi-fan failed w= ith error -22 > > > > On ASUS Chromebook Vero 514 CBV514-1H: > > > > [ 1.168905] acpi-fan INTC1048:00: probe with driver acpi-fan failed = with error -22 > > > > The issue is still present on next-20240529. > > > > I'm sending this report to track the regression while a fix is > > identified. I'll investigate the issue/run a bisection and report back > > with the results. > > > > This regression was discovered during some preliminary tests with the > > ACPI probe kselftest [1] in KernelCI. The config used was the upstream > > x86_64 defconfig with a fragment applied on top [2]. > > > > Best, > > > > Laura > > > > [1] https://lore.kernel.org/all/20240308144933.337107-1-laura.nao@colla= bora.com/ > > [2] https://pastebin.com/raw/0tFM0Zyg > > > > #regzbot introduced: v6.9-rc7..v6.10-rc1 > > The issue started happening after: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit= /drivers/thermal/thermal_core.c?h=3Dv6.10-rc1&id=3D31a0fa0019b022024cc082ae= 292951a596b06f8c > > Before this commit, get_cur_state() was not called by > __thermal_cooling_device_register, so the error was not triggered. > > After enabling debugging for the acpi-fan driver, I noticed these errors > in the logs: > > [ 0.682224] acpi INTC1044:00: Invalid control value returned > [ 0.682635] acpi INTC1044:00: Invalid control value returned > > The value stored in fst.control is 255, which is indeed not a valid > value. > > I suspect this might be a firmware issue that is now manifesting due to > the addition of the extra get_cur_state() call. > > I'll dig a bit more and report back. It looks like _FST returns all ones if it is evaluated before _FSL on the affected platforms. It shouldn't do that, but then it is not particularly useful to fail cdev registration for this reason. The attached patch should work around this issue, please try it and report = back. --000000000000e387b6061a006270 Content-Type: text/x-patch; charset="US-ASCII"; name="thermal-cdev-init.patch" Content-Disposition: attachment; filename="thermal-cdev-init.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lwzaoq0u0 LS0tCiBkcml2ZXJzL3RoZXJtYWwvdGhlcm1hbF9jb3JlLmMgICAgfCAgIDExICsrKysrKystLS0t CiBkcml2ZXJzL3RoZXJtYWwvdGhlcm1hbF9kZWJ1Z2ZzLmMgfCAgICA3ICsrKysrKy0KIDIgZmls ZXMgY2hhbmdlZCwgMTMgaW5zZXJ0aW9ucygrKSwgNSBkZWxldGlvbnM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