Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp56254lqb; Tue, 4 Jun 2024 05:07:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWfYn3n43SGKTYkuCZGODUPhb83HF6/VNdTLC9YamWF3tQx/M+qjkorhn31oRCuD5+5jBZfoe+BRH6tkY+ZJfFb4itgC5gLnEyXesBj9g== X-Google-Smtp-Source: AGHT+IG+WwpfnloEdlnckW1wcSbsQUdwTb4uIIIFQym4Rtrh5bT6b5Y9kaouYCrIaG+ubfP6nWs7 X-Received: by 2002:a17:902:e846:b0:1f2:f63b:4795 with SMTP id d9443c01a7336-1f636fc56e3mr155063855ad.14.1717502863729; Tue, 04 Jun 2024 05:07:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717502863; cv=pass; d=google.com; s=arc-20160816; b=EgzCdQiAjlW4JB3dZBw+91+79yq0krEafZwx84Ttj7Mlf0h9xAJb7V2HHHgHiNPYxg sSZXsLf+rYgYYnk6KaKOV8iyFQaNU4Y6RSyJQLObFbXdbXWYSn9F9n6OJ8q8+Bjo9AO1 UA0dFBVGTD9mu1E4djYpg2VA1uhQwIXpx2tr/nH4476IcM01xrr8AgaJ9Wnbm9d0Hit5 3Eoy/jUL7XxG32gCiMOgej/yZnISmyIRbamp4XBuzA07MjxEAvSPV9JzBeOGV9SQHlu7 5loWUx18w+p4SVlSdlvdDTqVBQIECTPi7Sb9GZSq3R4zXfwa2RdwACGbWsuLXhMIuXs9 +Bug== 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=VDS4lGGklKgyO/vnISCNWdEiwRbtgHHVywB8vDaEyT4=; fh=tkQj4ZdR0amMYh5Wn/wlRcNKm/gY5nfoz7ut12+uVA0=; b=MzjSr4CCny3NX+wqTC0j9gI/gQl+j9304Jh4QfvyFlCwA+x5TAY56nsenKhpmr6TxU LYf98y6k2rzjejrUYbtqLhBbnyY0rdCXXJrt25GT+OCbgIKhuVqhA1KFK37eTpMQRpIQ tNuMrdRhjuC7vi95lVABVp73PjqXSKjSFGKsjeMZqcGbiq3zgLjh+OlF+Uzm+TqmVgWC A5HCeKLWOu+ptM7RgbyNDQOOHRKrkF6xXXxMKP7Etb1dmatYXfv6R/TYHqnXAkSMpeXv X6ZjZpfSSZ8PWD5lVSiJlxExHyYwhLBpXRxhcFwOlUDiZov4zWIYo1sJEmaXPovQw2cf 4RUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hNBanyZ6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-200567-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200567-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. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f65539271asi57023485ad.365.2024.06.04.05.07.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 05:07:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200567-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hNBanyZ6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-200567-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200567-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 D9E7C282390 for ; Tue, 4 Jun 2024 12:07:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40F82145B27; Tue, 4 Jun 2024 12:07:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hNBanyZ6" 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 3EA0713D609; Tue, 4 Jun 2024 12:07:35 +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=1717502856; cv=none; b=RKkXmK1T/GSpmdfc/GUQdopR+3lMm8fOq00s5OzpGJTnwBpzLmU1o40BjiegDWkK8Y8DcoB0PBd12mzrfOFZMavs5KA8R7QIwdx24A2E5omx/aUdDPiCPrxNQeKw8hwzD0Du74YVv6BkQOcEaLy/r5DdJxQvDtLyOcRDKc/kdc8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717502856; c=relaxed/simple; bh=HMDbYgqTJpPgikhVUtIdqxkkkujpvvcYvcdFP5Poxaw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=oDNYl3CH9SFijd2tAYIECasJMBDRRtLJVdq3FdG8X7yaCFT+6f6rMhc1rXQTPVw+3xOSS3YyrnlhqZ4JpyP34ASye//9F16PYO5uWo0pUY1PC+iqsyAijaSWJFSXdPrvkujVqgBj9dGFu9QtXmSErpDKzVK+Z1H0MmNaU7QgFK4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hNBanyZ6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BED72C4AF08; Tue, 4 Jun 2024 12:07:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717502855; bh=HMDbYgqTJpPgikhVUtIdqxkkkujpvvcYvcdFP5Poxaw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hNBanyZ6sNoUtD3u+Z1BunrFq0Xw7ZTQEjPrew4Ou4Ir53ZcL2/Xgj7c59qCndAAv fpb3aJGHGpixHJnet7F0x2zLj+EgaqoVctHAlIYmDo8XboeFgiUrAZCuMwYSYkTUV9 eYUEFvjwX5w0mUnBpd53UEdvBSr1vsTBdXLnVAw3LxIHE2XwLGM8nRbfeiJl2rNxLb 8XFRG7cic9jDHng1ohYisost4YxydaxMhTHGepiayMNpZR38WZp0JPimi4O9A+jWvN GimMLrZd2mnyb4IagtEmSqHiCtfkWyf7BwaPbCFSf8JSNAdDwfg7mFbvKM+B16Ylte fOfZbh2DqjBVQ== Received: by mail-oo1-f46.google.com with SMTP id 006d021491bc7-5ba65db2d05so13597eaf.0; Tue, 04 Jun 2024 05:07:35 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUe56SgzabKqjwRsfg7pKwN63qcXLTGmKQ6qSEUTfLccnrRsUV8qFgDZ1fE4uhKHiJ+oF8hM2vZ/u12tkMth/DETull3smRBtURzctsFo72W3MCup8OxtSjOkVFacsP2B6KCWqqqyf93g== X-Gm-Message-State: AOJu0Yxbxad+wTnWAX/J+RoHV6SVaDWALtrhmFyGPTrd7jxDt4Iu2xM7 Tudj4+bpGUzNSkBQ/vazmGDSfC/rkFO/lyEfSErEWuhmb3Eetzm7qUfdZNzZDbLPaZriFCQacZp PwA4WcI2UqjK5dnPRJvGpa/z0uvw= X-Received: by 2002:a05:6820:b43:b0:5ba:6959:edf8 with SMTP id 006d021491bc7-5ba6959efe4mr1135214eaf.1.1717502854963; Tue, 04 Jun 2024 05:07:34 -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: From: "Rafael J. Wysocki" Date: Tue, 4 Jun 2024 14:07:22 +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="00000000000092f01b061a0f4bed" --00000000000092f01b061a0f4bed Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jun 3, 2024 at 8:20=E2=80=AFPM Rafael J. Wysocki wrote: > > 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 LAV= A > > > 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 faile= d with error -22 > > > > > > Similar errors are reported on other devices with fans compatible wit= h > > > 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= with error -22 > > > > > > On ASUS Chromebook Vero 514 CBV514-1H: > > > > > > [ 1.168905] acpi-fan INTC1048:00: probe with driver acpi-fan faile= d 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 bac= k > > > with the results. > > > > > > This regression was discovered during some preliminary tests with the > > > ACPI probe kselftest [1] in KernelCI. The config used was the upstrea= m > > > x86_64 defconfig with a fragment applied on top [2]. > > > > > > Best, > > > > > > Laura > > > > > > [1] https://lore.kernel.org/all/20240308144933.337107-1-laura.nao@col= labora.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/comm= it/drivers/thermal/thermal_core.c?h=3Dv6.10-rc1&id=3D31a0fa0019b022024cc082= ae292951a596b06f8c > > > > 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 error= s > > 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 repor= t back. A !ret check is missing in that patch, so please try the attached new version of it instead. Thanks! --00000000000092f01b061a0f4bed Content-Type: application/x-patch; name="thermal-cdev-init-2.patch" Content-Disposition: attachment; filename="thermal-cdev-init-2.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lx0csvlc0 LS0tCiBkcml2ZXJzL3RoZXJtYWwvdGhlcm1hbF9jb3JlLmMgICAgfCAgIDExICsrKysrKystLS0t CiBkcml2ZXJzL3RoZXJtYWw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