Bug 6395
Summary: | Fail to resume on Tecra M2 with ADM1032 and Intel 82801DBM | ||
---|---|---|---|
Product: | Drivers | Reporter: | Daniele Gaffuri (d.gaffuri) |
Component: | I2C | Assignee: | Jean Delvare (jdelvare) |
Status: | RESOLVED CODE_FIX | ||
Severity: | high | CC: | elendil |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.16 - 2.6.17-rc1 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
Fix i2c-i801 resume when PEC is enabled
Fix i2c-i801 suspend and shutdown when PEC is enabled Clear PEC bit after every transaction |
Description
Daniele Gaffuri
2006-04-16 06:12:38 UTC
Thanks for the very complete bug report and the detailed analysis. So it looks like your system won't resume properly if the i801 PEC bit was set when suspend happened. Please undo your own change and try the following patch instead. I don't use suspend myself, and my ADM1032 chip is not on my i801 adapter anyway, so I can't test it. I don't know much about suspend and resume also so this is a first try, which may or may not work. Please let me know. Created attachment 7882 [details]
Fix i2c-i801 resume when PEC is enabled
Created attachment 7883 [details]
Fix i2c-i801 suspend and shutdown when PEC is enabled
Thank you very much for the ready answer. Your patch works correctly for the
suspend/resume case, and I've elaborated on it to cover shutdown and reboot.
I'm not an hacker, so I hope I've used the correct hooks in pci_driver struct:
I've added similar code in the shutdown and in the remove functions to cover
both the built-in and the module configurations.
Tested on 2.6.17-rc1, it works both in kernel and as a module.
Thank you again for your help.
Daniele, maybe you can still report the problem to Toshiba? They really should fix their BIOS code. Created attachment 7896 [details]
Clear PEC bit after every transaction
After some discussion, this more simple fix seems to be prefered. It should
work just as fine, and is also more robust with regards to unclean reboots.
Please test.
Hi Jean that's exactly the first patch I tried, and it worked. I'll test it again and I'll let you know. I'm also trying to find how to report the problem to Toshiba, but there's not an obvious way to do it. Thanks again Daniele I confirm that tha last patch works, tested on 2.6.17-rc1 I've tested this patch and it solves the identical problem I had on my Toshiba Satellite A40. But more importantly, it also solves the problem I've been having since 2.6.16 that my fan no longer started automatically when the processor heats up, allowing it to overheat dangerously. See http://bugzilla.kernel.org/show_bug.cgi?id=6315. This patch magically restores fan/temperature control to what I was used to with 2.6.15. Please push this patch through for both 2.6.17 and 2.6.16. Frans, does the Tecra M2 have automatic fan speed regulation, as Frans described for the Satellite A40? Hi Jean I suppose you're asking to me. Yes, also Tecra M2 has auto fan control. In fact I've noticed some strange fan behaviour, but in my case the fan didn't turn off at low temps, so I didn't worry too much. It also seems that this doesn't happen anymore after patching. Oops, yes that was a question for you, Daniele. So this explains why the SMBus was hidden on both laptops. Toshiba seem to know their business. I think we will have to drop both quirks and leave the SMBus hidden again on these laptops. I'm sorry about that, but the current situation is unsafe, and we don't want users to burn their hardware. Jean, the users too don't want to fry their hardware -). I'm sad because the quirk for Tecra M2 was my first and only patch to linux kernel, but I realize it probably should be dropped until a safe solution is found. I've searched a lot without finding any documentation, do you think that you, as a kernel developer, may ask some clarification to Toshiba? Cheers Daniele No, I have no technical contact at Toshiba. I'll not remove the quirks right away. Let's take some time to discuss the alternatives and try a few hacks first. Maybe the ACPI folks with have an idea. As was discussed in bug #6315, it is now clear that on these Toshiba laptops (Satellite A40 and Tecra M2) the thermal management is done by SMM code, which can access the SMBus at any time. Thus the only safe option is to remove the quirk that was unhiding the SMBus. I am sorry about that, I understand that you liked that quirk and I agree that the risk that something actually goes wrong with it is thin, but still this is a risk I am not willing to take. |