From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.16 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796080138; b=hbmPdHg1bXfUaePYYQEJjFVr4O3SljuEKKVIO422lEf/7N9x1M4vppVTE1aBZtY4mywb aWiIdT3OG2q/EoCdZKsPoABp6XMelmW5AueDGOQz45rkSSa4PWVkAFYqmknkUMhIm0x90 Du8gNclVdU/Bn5PJd6CIuADoQLJpHteEePfLyYAaGnnjOvsHVNs/PXDNy5WdOmxDRr6R/ FW7Q0YPrLEj1zkBddoU7v1DGT1agtHyqonkFKT4l3g/oiZ6FojUtpdyp3Vbw+2GJFiL68 7roasArRfgxQXNcTmWUuYL2yf6p93Rq4E7ClYnfUfIceAmUGTO+Gezg/UeYaOworX3g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796080138; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:From:Date:To:cc: Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type; bh=MA/N3IZacpWWstdfQCvTycEnb1DFfzLj+i3BkbeJg10=; b=SSoyrg1a9WZ+zYy7L8Sn/oZdpyxipUkdlgs7zw9bIHPUHAfIW603YtMgw0rcYEc8l9Bu +E2JQ4/KOpGfKnXr9RFIXGZENYB+cnqG4Icasu41auBazEOZZnVZ+Pon+naOa+2hArggT 2AUb3kVOnhqju8pfIiHRXDA3geBKkS7UB3KhMXHHqmDtG5nTVfnZoIC/RhNkB5QXQZTKm EFXXzN1cFQd81PCrhNVV3TNZ5kXUDTO4oh2NNyf71nkn7Foi1m6ihGlo9rUz656UXZc+r fTOK4Qji6gtDrUe05xx9M3MSJ/PdD55SgcBWp2bH7/68LqnNg6aiQ7d6tu2FiLt1shg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=dDhxZPG0; arc=none smtp.remote-ip=192.198.163.16 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E8C4606A31A; Mon, 30 Nov 2026 23:08:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3E8C4606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=dDhxZPG0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796080137; x=1827616137; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=MA/N3IZacpWWstdfQCvTycEnb1DFfzLj+i3BkbeJg10=; b=dDhxZPG0n9P4CGQZiayG4HRMBRyPxXy3mTWOWlwWpJCTmS7+x09VbS7s lCQUg3yHxCAHR1SRInmICOuIJZnBTpJuSXPqggDCiQwZeqQQ84L9Bl2rJ yPzrqItqldl6a1sXWK8HELOr7xoLrsA8QMF2JlIJQXxs8MnVxiTZauIKR gPxnR/m01iXkO1u7oUVWrDQc4tuIjP1oROKVkQcjxZ4HVpnXYZvUMYWuQ AB8fW3a+YIceVmi/Kn4PBsGguJdu+ebNjbechGW6xLRLtNw9q5G3jLnr/ Qr9maFbH8ylLx+tJTnkinyThAPHlxpLFd6uhBmGz27FLjO4k8532Mhfov Q==; X-CSE-ConnectionGUID: FTbdAwymRoyHMTu7p9R+3A== X-CSE-MsgGUID: xe2fSMjYTYq81bT7DQxcrg== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4935169" X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208";a="4935169" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 15:08:56 -0800 X-CSE-ConnectionGUID: tsrKBvB5R4q/R43KTotIDg== X-CSE-MsgGUID: QXvEeJyTQK6Rx/DiL0fWhA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208";a="13042145" Received: from ijarvine-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.244.112]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 15:08:52 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Tue, 1 Dec 2026 01:08:49 +0200 (EET) To: Vishnu Sankar cc: Huang Wei , Hans de Goede , Mark Pearson , "Derek J . Clark" , Rong Zhang , Henrique de Moraes Holschuch , platform-driver-x86@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, LKML , klorico2@lenovo.com, vsankar@lenovo.com Subject: Re: [PATCH] platform/x86: thinkpad acpi: Fix fan speed reporting on X9 Gen 1 In-Reply-To: Message-ID: <4ae33045-26bf-3cab-e914-51e46ba3cb10@linux.intel.com> References: <20261126085937.53711-1-vishnuocv@gmail.com> <20261127070150.3655628-1-huangwei@kylinos.cn> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-1494600083-1796080129=:21476" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1494600083-1796080129=:21476 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 1 Dec 2026, Vishnu Sankar wrote: > Hi Huang Wei, >=20 > Thanks for the review. >=20 > On Fri, Nov 27, 2026 at 4:02=E2=80=AFPM Huang Wei w= rote: > > > > On Thu, Nov 26, 2026 at 08:59:37AM +0000, Vishnu Sankar wrote: > > > On the ThinkPad X9-14 Gen 1 and X9-15 Gen 1, the EC reports fan1 RPM > > > in registers 0x84/0x85 and fan2 RPM in 0x82/0x83, and does not use > > > bit 0 of 0x31 as a fan select. As a result fan2 reports fan1's speed, > > > and every fan read overwrites an EC-owned bit. > > > > For context from the other side of this history: we ran into the X9-14 > > Gen 1 EC layout back in August from the thermal side (bug 221228), > > tried to reuse the non-standard quirk-table offsets at the time, and > > reverted after the EC data showed the X9 has its own register layout - > > so it's good to see the fan side done right this time, based on what > > the EC actually implements. > > > > Verified against the current source: > > > > - The new quirk bits (TPACPI_FAN_2REG 0x0100, TPACPI_FAN_UNLATCH 0x0200= ) > > don't collide with the existing fan quirk flags (0x0002/0x0004). > > - With 2REG, fan_select_fan1()/fan_select_fan2() become no-ops, which > > removes both problems in one go: fan2 no longer aliases fan1's > > registers, and the 0x31 writes that clobbered an EC-owned bit are > > gone. > > - The UNLATCH re-read (MSB, LSB, MSB again until stable) is the right > > guard for a non-latching register pair. > > > > One thing worth a line in the commit message, maybe: the unlatched > > path reads the MSB first, while the latched path keeps the "read 0x84 > > before 0x85" ordering that older EC firmware requires. Your testing > > shows the X9 EC doesn't have that old quirk, but a note that the read > > order is intentionally different would save the next person some > > archaeology. > > > Thanks for the review, and for the background from the thermal side. >=20 > Yes. The X9 EC does not latch, so the LSB-first rule doesn't > apply there, but that isn't obvious from the code. >=20 > Hans, Ilpo, I can either send a v2 adding a short comment in > fan_read_rpm(), or a small > follow-up patch on top if you'd rather take this one as is. Whichever > is easier for you. > > Either way, that's a nit, not an objection: > > > > Reviewed-by: Huang Wei v2 is easier for me. Thanks. --=20 i. --8323328-1494600083-1796080129=:21476--