Skip to content

Commit 2b9f84e

Browse files
e-c-dij-intel
authored andcommitted
platform/x86: thinkpad_acpi: disable ACPI fan access for T495* and E560
T495, T495s, and E560 laptops have the FANG+FANW ACPI methods (therefore fang_handle and fanw_handle are not NULL) but they do not actually work, which results in a "No such device or address" error. The DSDT table code for the FANG+FANW methods doesn't seem to do anything special regarding the fan being secondary. The bug was introduced in commit 57d0557 ("platform/x86: thinkpad_acpi: Add Thinkpad Edge E531 fan support"), which added a new fan control method via the FANG+FANW ACPI methods. Add a quirk for T495, T495s, and E560 to avoid the FANG+FANW methods. Fan access and control is restored after forcing the legacy non-ACPI fan control method by setting both fang_handle and fanw_handle to NULL. Reported-by: Vlastimil Holer <vlastimil.holer@gmail.com> Fixes: 57d0557 ("platform/x86: thinkpad_acpi: Add Thinkpad Edge E531 fan support") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219643 Cc: stable@vger.kernel.org Tested-by: Alireza Elikahi <scr0lll0ck1s4b0v3h0m3k3y@gmail.com> Reviewed-by: Kurt Borja <kuurtb@gmail.com> Signed-off-by: Eduard Christian Dumitrescu <eduard.c.dumitrescu@gmail.com> Co-developed-by: Seyediman Seyedarab <ImanDevel@gmail.com> Signed-off-by: Seyediman Seyedarab <ImanDevel@gmail.com> Link: https://lore.kernel.org/r/20250324152442.106113-1-ImanDevel@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent 7b98c1c commit 2b9f84e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8794,6 +8794,7 @@ static const struct attribute_group fan_driver_attr_group = {
87948794
#define TPACPI_FAN_NS 0x0010 /* For EC with non-Standard register addresses */
87958795
#define TPACPI_FAN_DECRPM 0x0020 /* For ECFW's with RPM in register as decimal */
87968796
#define TPACPI_FAN_TPR 0x0040 /* Fan speed is in Ticks Per Revolution */
8797+
#define TPACPI_FAN_NOACPI 0x0080 /* Don't use ACPI methods even if detected */
87978798

87988799
static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
87998800
TPACPI_QEC_IBM('1', 'Y', TPACPI_FAN_Q1),
@@ -8824,6 +8825,9 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
88248825
TPACPI_Q_LNV3('N', '1', 'O', TPACPI_FAN_NOFAN), /* X1 Tablet (2nd gen) */
88258826
TPACPI_Q_LNV3('R', '0', 'Q', TPACPI_FAN_DECRPM),/* L480 */
88268827
TPACPI_Q_LNV('8', 'F', TPACPI_FAN_TPR), /* ThinkPad x120e */
8828+
TPACPI_Q_LNV3('R', '0', '0', TPACPI_FAN_NOACPI),/* E560 */
8829+
TPACPI_Q_LNV3('R', '1', '2', TPACPI_FAN_NOACPI),/* T495 */
8830+
TPACPI_Q_LNV3('R', '1', '3', TPACPI_FAN_NOACPI),/* T495s */
88278831
};
88288832

88298833
static int __init fan_init(struct ibm_init_struct *iibm)
@@ -8875,6 +8879,13 @@ static int __init fan_init(struct ibm_init_struct *iibm)
88758879
tp_features.fan_ctrl_status_undef = 1;
88768880
}
88778881

8882+
if (quirks & TPACPI_FAN_NOACPI) {
8883+
/* E560, T495, T495s */
8884+
pr_info("Ignoring buggy ACPI fan access method\n");
8885+
fang_handle = NULL;
8886+
fanw_handle = NULL;
8887+
}
8888+
88788889
if (gfan_handle) {
88798890
/* 570, 600e/x, 770e, 770x */
88808891
fan_status_access_mode = TPACPI_FAN_RD_ACPI_GFAN;

0 commit comments

Comments
 (0)