Bug 200737
Summary: | i801: driver SMBus access protection breaks touchpad on ThinkPad T560 | ||
---|---|---|---|
Product: | Drivers | Reporter: | Yussuf Khalil (dev) |
Component: | I2C | Assignee: | Drivers/I2C virtual user (drivers-i2c) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | jdelvare, mika.westerberg, mirh, rjw |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 4.18-rc7 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
acpidump output
Uninstall OpRegion handler on suspend dmesg output with patch applied Allow AML OpRegion access during suspend dmesg output with "Allow AML OpRegion access during suspend" applied dmidecode output Allow IO access for non-SMBus ports dmesg output with "Allow IO access for non-SMBus ports" applied |
Description
Yussuf Khalil
2018-08-05 21:51:09 UTC
Created attachment 277907 [details]
Uninstall OpRegion handler on suspend
Can you try the attached patch? Regardless whether it works or not, please attach full dmesg of the test run to the bug as well.
Created attachment 277979 [details]
dmesg output with patch applied
Thank you very much for the patch. Indeed, the touchpad keeps working fine after resuming from suspend with the patch applied, however, I am getting a bunch of ACPI errors in dmesg.
Created attachment 277983 [details]
Allow AML OpRegion access during suspend
Indeed I forgot that acpi_remove_address_space_handler() does not reset the default handler. Here's a new patch that allows OpRegion access during suspend. Can you give it a try?
Created attachment 277989 [details]
dmesg output with "Allow AML OpRegion access during suspend" applied
This one doesn't work for me. I've attached the dmesg output again. Notably, I am now getting the "Driver SMBus register access inhibited" message right after resume.
I looked more closely ACPI tables of this system and it seems that the BIOS AML code actually does not touch the SMBbus I/O registers at all. It just reads iTCO BAR and then tries to write there. I think here the correct fix would be to not to install this special OpRegion handler at all. Can you attach output of dmidecode to the bug? Created attachment 277999 [details]
dmidecode output
Sure, here you go.
Created attachment 278011 [details]
Allow IO access for non-SMBus ports
Here is another patch to try out. This one should allow IO access from AML if it does not touch SMBus ports.
Created attachment 278015 [details]
dmesg output with "Allow IO access for non-SMBus ports" applied
Thank you, this one indeed fixes the issue without breaking anything as far as I can see. I've attached the dmesg output again.
Great, thanks for testing. I'll send a formal patch out soon. Ehrm.. Just for the records, are you sure bug 110041 would still be a thing in the first place? I ask because while investigating bug 200713, I found out my almost identical warning message to get solved since ACPICA improved module level code handling. Yes it is because this is not about wrong ASL code but the fact that the BIOS uses the same I/O space with the SMBus device and we need to be sure that they don't mess with each other. Fix has been committed meanwhile, so closing: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=7fd6d98b89f382d414e1db528e29a67bbd749457 |