Bug 215730 - acpi_bus_register_driver() does not work on Alder Lake
Summary: acpi_bus_register_driver() does not work on Alder Lake
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform_x86 (show other bugs)
Hardware: x86-64 Linux
: P1 high
Assignee: drivers_platform_x86@kernel-bugs.osdl.org
URL:
Keywords:
: 215724 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-03-23 03:28 UTC by xuemin
Modified: 2022-03-24 03:58 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.13, 5.16, maybe all.
Subsystem:
Regression: No
Bisected commit-id:


Attachments
acpidump.output.txt (3.80 MB, text/plain)
2022-03-23 05:36 UTC, xuemin
Details
acpidump.output.txt--after-updated-latest-BIOS (3.63 MB, text/plain)
2022-03-23 09:24 UTC, xuemin
Details

Description xuemin 2022-03-23 03:28:30 UTC
e.g.

in drivers/platform/x86/toshiba_acpi.c
acpi_bus_register_driver(&toshiba_acpi_driver);
does not work:

when execute acpi_bus_register_driver(&toshiba_acpi_driver).
the ".add" function is not called to add the driver.

and dmesg no errors/warnings have been reported when insmod this driver.

This issue exists on Alder Lake.
This issue does not exist on Tiger Lake.

Thank you.
Comment 1 Matthew Garrett 2022-03-23 03:34:09 UTC
Can you attach the output of acpidump? It's unlikely that this is down to the CPU, but more likely that the device ID has changed.
Comment 2 xuemin 2022-03-23 05:36:46 UTC
Created attachment 300602 [details]
acpidump.output.txt
Comment 3 xuemin 2022-03-23 05:46:07 UTC
(In reply to Matthew Garrett from comment #1)
> Can you attach the output of acpidump? It's unlikely that this is down to
> the CPU, but more likely that the device ID has changed.
Hi Garrett,
Thank you for the infomation.
Please see the attached file above.
Comment 4 Matthew Garrett 2022-03-23 06:13:04 UTC
Yes, no devices supported by toshiba_acpi are present in your ACPI tables, so this is expected. Any functionality that toshiba_acpi has is probably implemented via WMI instead on this device.
Comment 5 xuemin 2022-03-23 09:24:32 UTC
Created attachment 300608 [details]
acpidump.output.txt--after-updated-latest-BIOS
Comment 6 xuemin 2022-03-23 09:31:12 UTC
Hi Garrett

Thank you.
 

Which ACPI table related? which device id?
Would you tell some details about it?  
I checked the device on Windows, seems the functions are working without problems.
(Windows uses the same ACPI tables/interfaces from BIOS too)

I have updated the latest BIOS for the device. but no luck to the problem.
I attached again the new acpidump out after updating the latest BIOS. 
Would your check if still the same issue ( devices id related?)
Comment 7 Matthew Garrett 2022-03-23 09:36:30 UTC
acpi_bus_register_driver passes a set of supported ACPI device IDs to the kernel. In the case of toshiba_acpi, it's:

       {"TOS6200", 0},
        {"TOS6207", 0},
        {"TOS6208", 0},
        {"TOS1900", 0},

If your firmware exposes any of these devices then the add method will be called. Your firmware doesn't expose any of them, and so it isn't. The driver simply doesn't support your hardware.

What functionality on your system is not working?
Comment 8 xuemin 2022-03-23 09:47:39 UTC
All functions which depending on toshiba_acpi are not working.
 
static struct acpi_driver toshiba_acpi_driver = {
	.name	= "Toshiba ACPI driver",
	.owner	= THIS_MODULE,
	.ids	= toshiba_device_ids,
	.flags	= ACPI_DRIVER_ALL_NOTIFY_EVENTS,
	.ops	= {
		.add		= toshiba_acpi_add, // ===> here
		.remove		= toshiba_acpi_remove,
		.notify		= toshiba_acpi_notify,
	},
	.drv.pm	= &toshiba_acpi_pm,
};

the toshiba_acpi_add(...){ ...} not be excuted on that device.
Thanks.
Comment 9 Matthew Garrett 2022-03-23 19:10:19 UTC
Your laptop does not implement the ACPI interfaces that this driver needs.
Comment 10 xuemin 2022-03-24 02:44:14 UTC
Hi Garrett

Thank you very much for your advise.
I confirmed with the BIOS team of the laptop.
A new device Id has been added from Alder Lake platfrom:
 { "DNBK0001",0}

I added above device Id and the toshiba_acpi driver works on the laptop.

Thank you.

Best regards.
Comment 11 xuemin 2022-03-24 03:58:14 UTC
*** Bug 215724 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.