[PATCH v13 7/7] platform/x86: bitland-mifs-wmi: Permit zero on SET functions
From: Mingyou Chen
Date: Wed Oct 21 2026 - 08:47:44 EST
On Bitland laptops, the ACPI firmware returns 0x0000 for the function
field on SET operations, while setting the return code to success
(0x8000).
Because bitland_mifs_wmi_call() expects the returned function to match
the requested function ID, these write operations fail with -ENOMSG (-42).
Allow a return function value of 0 on SET operations to prevent false
error reports.
Fixes: dc1ec4fa86b2b ("platform/x86: bitland-mifs-wmi: Add new Bitland MIFS WMI driver")
Signed-off-by: Mingyou Chen <qby140326@xxxxxxxxx>
---
drivers/platform/x86/bitland-mifs-wmi.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index f4f37ae2f424..a4c341ffbb9b 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -258,10 +258,14 @@ static int bitland_mifs_wmi_call(struct bitland_mifs_wmi_data *data,
}
if (function != input->function) {
- if (!(data->quirks->accept_zero_function && function == 0))
- return -ENOMSG;
+ if (function == 0 && (data->quirks->accept_zero_function ||
+ input->operation == cpu_to_le16(WMI_METHOD_SET)))
+ goto fn_ok;
+
+ return -ENOMSG;
}
+fn_ok:
if (output) {
output->return_code = return_code;
output->function = function;
--
2.56.0