Bug 14733
Description
Andrey Ovcharov
2009-12-04 14:09:38 UTC
Created attachment 24018 [details]
all info gentoo-sources-2.6.32
Created attachment 24019 [details]
bug dmesg on gentoo-sources-2.6.32
Created attachment 24020 [details]
bug config-gentoo-sources-2.6.32
Created attachment 24021 [details]
config-gentoo-sources-2.6.32
Created attachment 24022 [details]
dmesg on gentoo-sources-2.6.32
with CONFIG_PM_RUNTIME = y still spam in dmesg as "ACPI: EC: input buffer is not empty, aborting transaction" "ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.AMW0.WMCA] (Node ffff8800bbc3f3e0), AE_TIME ACPI: EC: input buffer is not empty, aborting transaction ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424)" But earned adjustment of monitor brightness! Confirmed. Got same errors with zen & arch linux kernels. Brightness adjustment works fine by default, i didn't change kernel params. ACPI: EC: input buffer is not empty, aborting transaction ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.AMW0.WMCA] (Node ffff88013f81a3a0), AE_TIME After reboot my laptop hangs up on bios tests, so i have to unplug ac and battery. (In reply to comment #8) > After reboot my laptop hangs up on bios tests, so i have to unplug ac and > battery. Same on my Acer Aspire 5930G. Using Archlinux and bug found at least till 2.6.32.2. Reverting back to 2.6.31 fixed the bug. This is critical as I thought my laptop was broken as it wouldn't start, and the only solution seems to be unplugging AC and battery for a while. Reply-To: wes@uresu.com HI all, It seems I may be experiencing this problem. http://www.mail-archive.com/acpi-bugzilla@lists.sourceforge.net/msg28491.html Distro : Fedora 12 uname -r : 2.6.31.9-174.fc12.i686.PAE Hardware : Acer Aspire 5735 Symptom1 : Brightness too low after wake-up Symptom2 : wifi dying - the fastest recovery is a reboot Symptom3 : like others I suspect the laptop was dead, the only recovery is remove AC & Battery, hold down power button, insert AC, start up & replace battery. Is there anything I can provide or do to help? Regards Wes In 2.6.33-r5(http://kernel.org/ mainline: 2.6.33-rc5 2010-01-21 ) everything exactly the same as it was in 2.6.32 I tried and with custom dsdt table... And without custom dsdt... Errors are the same as in 2.6.32: not working brightness control for display; spam in dmesg ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20091214/evregion-475) ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff8800bbf116d0), AE_TIME ACPI Exception: AE_TIME, Evaluating _BST (20091214/battery-393) for reboot need to unplugging battery Created attachment 24693 [details]
all info gentoo-sources-2.6.33-rc5
Created attachment 24694 [details]
kernel config-2.6.33-rc5
Created attachment 24695 [details]
custom dsdt table
Created attachment 24696 [details]
dmesg-2.6.33-rc5
> First of all kernels before 2.6.32 did not observe anything like that.
marking as 2.6.32 regression
(In reply to comment #0) > First of all kernels before 2.6.32 did not observe anything like that. This is strange. On gentoo I had the problem you describe with all kernel versions prior to 2.6.32. In fact I had to patch ec.c as described here: http://en.gentoo-wiki.com/wiki/Dell_Studio_1555#ACPI With all gentoo kernel packages version 2.6.32 the problem is gone, but I get bug 14667 in exchange, which is much worse by the way. There is definitely something going on insidee the ACPI driver between 2.6.31 to 2.6.32... Same problem here with all 2.6.32.* and, now tested, with 2.6.33rc8 Acer Aspire 5930G Same problem with stable 2.6.33 kernel (stable? ..not work in thousands of computer and is out anyway?). Please solve this problem is not possible this situation. All notebook Acer user not have possibility to upgrade in new kernel? why? Created attachment 25216 [details]
dmesg-2.6.33
Dmesg from 2.6.33 stable kernel.
pcxz, please post full dmesg, not the remains of it. /var/log/kern.log may have it. Created attachment 25236 [details]
This is full kernel message
pcxz, I see something weird in your kernel.log: EC starts up fine, then both Battery and AC drivers start up fine too (they do several accesses of EC during their init). Then NVIDIA proprietary driver starts and there is some error from MXMI/MXMS handler routings. And only after that every call to EC fails. Could you please check if not loading of NVIDIA driver helps? @Alexey: if it may help, the MXMI/MXMS error appears on 2.6.31 too (don't remember previous versions though), but doesn't cause the hangups and errors people experience with 2.6.32 and later. Here's the relevant lines in the kernel log: ACPI Warning: \_SB_.PCI0.PEGP.VGA_.MXMI: Excess arguments - needs 1, found 2 20090521 nspredef-287 ACPI Warning: \_SB_.PCI0.PEGP.VGA_.MXMS: Excess arguments - needs 1, found 2 20090521 nspredef-287 I only get this error once, so I suspect it appears upon NVIDIA module loading. Ok, let's put NVIDIA into "irrelevant" category. Please uncomment "#define DEBUG" in drivers/acpi/ec.c and enable printing of the timestamp in Kernel Debugging. Please attach full dmesg... Created attachment 25247 [details]
This is full kernel message without nvidia and ec.c in debug mode
This is full kernel message without nvidia and ec.c in debug mode
pcxz, it's is not full. It starts when EC is already performing something and stops while there is no error yet... Created attachment 25248 [details]
And this with timestamp in kernel
This kernel log is without nvidia with ec.c in debug mode and timestamp in kernel.
All log i send is after system is go in instable mode (micro freeze), temperature report 0° in all CPU (2 cpu), display light not work ecc..
I see after EC report 0x02 at infinite loop, computer is dead.
Created attachment 25250 [details]
Add delay before data write
Please check if this patch changes anything. Please submit kernel.log as text/plain, without compressing it.
Created attachment 25251 [details]
Same problem after apply patch
No change sistuation, system go in instable mode (at any restart have to unplug ac and battery)
P.S.
Is impossible for me send kernel.log not compress ..exceed 1000kb permitted (my kernel.log is 13MB)
Created attachment 25252 [details]
Add delay before data write, take #2
Let's increase delay.
Patch 2 seem work ok :) (30 minutes without problem) ..tomorrow test more time ..without and with nvidia module. For now thx, very good (and fast) work. Created attachment 25255 [details]
custom kernel config for gentoo-sources-2.6.33 (with custom dsdt table)
Created attachment 25256 [details]
all info gentoo-sources-2.6.33
Created attachment 25257 [details]
dmesg with error
This is without a patch. Nvidia module(x11-drivers/nvidia-drivers-190.53-r2 latest available on their website http://www.nvidia.ru/Download/index.aspx?lang=en) is loaded. Errors all the same. Right now try to patch... OK, for me this bug is solved with patch #2 With nvidia driver is ok, without nvidia driver is ok ...after suspend to ram resume ok. Thx at Alexey Starikovskiy Patch 2 is working for me!!! More than two hours and no errors! Even with the nvidia-drivers. brightness control works. restarts, too, as should normally restart (without unplug ac and battery) Thank you! After 4 hours in dmesg is another error : [16816.561291] ACPI: EC: input buffer is not empty, aborting transaction [16816.561297] ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20091214/evregion-475) [16816.561311] ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff8800bbf016d0), AE_TIME [16816.561363] ACPI Exception: AE_TIME, Evaluating _BST (20091214/battery-393) brightness control not works. Created attachment 25260 [details]
dmesg Evaluating _BST
Created attachment 25261 [details]
Add delay before data write, take #2
With "Add delay before data write, take #2" looks like all fine for me. Idem ..all fine same for me with "Add delay before data write, take #2" Thx. Running 64bit 2.6.32.9 with latest patch and seems to be OK for me too. Hi, alexey, I got the similar problem and the patch in comment #41 fixes the bug for me. And here are some feedbacks from the EC engineer, which I hope is useful for you. > >> After our analysis of this issue, we found there the communication > >> between Moblin OS (host) and EC might have some problems. > >> > >> Currently, Moblin OS will send Read/Write ECRAM command to EC via > >> 62h/66h I/O port, but it seems will not check IBF/OBF flag during the > >> access. > >> > >> That will cause OS sometimes will get the wrong data from EC or set > >> the wrong data to EC. > >> > >> You should follow the standard process as below: > >> > >> Read/Write ECRAM by using 62h/66h I/O port: > >> 66h (command/status port) > >> Input (byte): Get EC status. > >> Bit0: OBF (Output Buffer Full flag of EC) > >> Bit1: IBF (Input Buffer Full flag of EC) > >> Bit3: Command/Data Flag (0: Previous access port is data port/ 1: > >> Previous access port is command port) > >> Bit4: Burst enable flag > >> Output (byte): command from host to EC > >> 62h (data port) > >> Input (byte): data from EC to host > >> Output (byte): data from host to EC > >> > >> Read ECRAM > >> > >> 1. wait both IBF & OBF = 0 > >> 2. host write command 80h (EC_Read) to port 66h > >> 3. wait until IBF = 0 (wait EC firmware get the command) > >> 4. host write ECRAM index to port 62h > >> 5. wait until IBF = 0 and OBF = 1 (wait EC firmware get the index > >> and prepare the result data to output buffer) > >> 6. host read data via port 62h > >> > >> Write ECRAM > >> > >> 1. wait both IBF & OBF = 0 > >> 2. host write command 81h (EC_Write) to port 66h > >> 3. wait until IBF = 0 (wait EC firmware get the command) > >> 4. host write ECRAM index to port 62h > >> 5. wait until IBF = 0 (wait EC firmware get the index) > >> 6. host write data via port 62h > >> 7. wait until IBF = 0 (wait EC firmware get the data) > >> > >> Note: The process of Read/Write ECRAM should NOT be interrupted. > >> (Should treat as a critical section) > >> > >> Please check your S/W code and modify it to meet the standard EC > >> access process. Rui, Please list exactly what kernel (and version of the ec driver) were being described in comment #45 kernel version 2.6.32.4. but it's linpus kernel rather than the vanilla kernel. do you need the EC driver version? (In reply to comment #0) > > the third is markedly reduced performance. > The slow system performance is another symptom of: http://bugzilla.kernel.org/show_bug.cgi?id=14667 The fix for that is here now; it doubled the read speed of my SSD: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Flenb%2Flinux-acpi-2.6.git;a=commitdiff_plain;h=dadf28a10c3eb29421837a2e41 People using Acer laptops may be interested to know that the problem went away (so far) after upgrading the BIOS from 1.19 to 1.23 on my 5930G. @colemarc: No, I've always had v1.23 on my 5930G and I'm getting the issues. BIOS Information Vendor: Phoenix Technologies LTD Version: V1.23 Release Date: 10/28/2008 I'm still running the patched 2.6.32.9, can't upgrade to 2.6.33 until this is fixed. And why don't you patch .33? I'm running .33 zen-kernel with this patch and everything is ok. On Wed, Apr 14, 2010 at 3:28 PM, <bugzilla-daemon@bugzilla.kernel.org> wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=14733 > > > > > > --- Comment #50 from Stephane Travostino <stephane.travostino@gmail.com> > 2010-04-14 11:28:07 --- > @colemarc: No, I've always had v1.23 on my 5930G and I'm getting the issues. > > BIOS Information > Vendor: Phoenix Technologies LTD > Version: V1.23 > Release Date: 10/28/2008 > > I'm still running the patched 2.6.32.9, can't upgrade to 2.6.33 until this is > fixed. > > -- > Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You are on the CC list for the bug. > @Azraelle: 2.6.32.9 is fine for me now. I had to upgrade due to 2.6.32 being a dependency of some newer packages in my distribution (Archlinux), otherwise I would've stayed with vanilla 2.6.31 I'll upgrade when it gets fixed in the vanilla code. (In reply to comment #50) > @colemarc: No, I've always had v1.23 on my 5930G and I'm getting the issues. > > BIOS Information > Vendor: Phoenix Technologies LTD > Version: V1.23 > Release Date: 10/28/2008 Sorry, indeed I was using "Ubuntu 2.6.32-19.28-generic 2.6.32.10+drm33.1" when the laptop run about 6 hours without issues (then I shut it down). Went to "Ubuntu 2.6.32-20.30-generic 2.6.32.11+drm33.2" and the issue resurfaced after few minutes. Now I am back to 2.6.32.10 to see if the problem stays away. Someone noticed that even Windows complains about ACPI Embedded Controller, and in fact I sometime see this one in Windows 7 Event Viewer: “The embedded controller (EC) did not respond within the specified timeout period. This may indicate that there is an error in the EC hardware or firmware or that the BIOS is accessing the EC incorrectly. You should check with your computer manufacturer for an upgraded BIOS. In some situations, this error may cause the computer to function incorrectly.” (In reply to comment #53) > Sorry, indeed I was using "Ubuntu 2.6.32-19.28-generic 2.6.32.10+drm33.1" > when > the laptop run about 6 hours without issues (then I shut it down). > Went to "Ubuntu 2.6.32-20.30-generic 2.6.32.11+drm33.2" and the issue > resurfaced after few minutes. > Now I am back to 2.6.32.10 to see if the problem stays away. And the problem stays away using Ubuntu 2.6.32-19.28-generic. I have seen the issue using 2.6.32-20.X and 2.6.32-21.31. Fedora 13's 2.6.33 kernel has been stable with the patch from comment #41 applied. Vanilla kernel 2.6.34 have same problem ..after apply patch at post #41 ..all ok :) P.S. why not add to stable kernel? The patch from comment #41 as applied to the F13 kernel breaks sleep button and lid events on the Clevo M720R notebook (which were previously fixed by the EC multibyte patches, see bug 14667). See also: https://bugzilla.redhat.com/show_bug.cgi?id=599679 Any news? 2.6.34.1 is unusable without the patch. Is there a plan on how to solve this on future kernel versions? This fixes the issue with no noticeable side effects on my Aspire 5730Z running Archlinux as well. The patch disrupts ACPI on my notebook more than I'd first suspected, not only do I not get sleep/lid events, it prevents correct reading of the power and battery state. hi, i have the same problem with Maverick 10.10 with kernel 2.6.35.22, i tried to update the kernel to 2.6.36 but the problem persist, i also updated the bios and here the pc changed his behavior before it will hung at the screen boot (with the acer logo) now it try to load the system but at 1/3 ot the loading bar of the bios it crash and it try infinitely to load it again until i pull my battery and the ac/dc.. i noticed that before the errors appear i have always these two strings: lo: Disabled Privacy Extensions CE: hpet increased min_delta_ns to 11250 nsec i don't know if they are related to the problem. the patch listed above can i apply to the current kernel version? (excuse me for my english -i'm italian- and i hope you'll solve this problem soon because i don't want to leave ubuntu) *** Bug 15560 has been marked as a duplicate of this bug. *** (In reply to comment #60) > The patch disrupts ACPI on my notebook more than I'd first suspected Patch continues to break things for me on 2.6.36. sys-kernel/vanilla-sources-2.6.36 problem is still there. patch helps. sys-kernel/vanilla-sources-2.6.37_rc3 The problem still exists. patch is applied with errors: # patch < acpi-ec-add-delay-before-write.patch can't find file to patch at input line 7 Perhaps you should have used the -p or --strip option? The text leading up to this was: -------------------------- |https://bugzilla.kernel.org/show_bug.cgi?id=14733#c41 | |diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c |index 27e0b92..09fbb69 100644 |--- a/drivers/acpi/ec.c |+++ b/drivers/acpi/ec.c -------------------------- File to patch: /usr/src/linux/drivers/acpi/ec.c patching file /usr/src/linux/drivers/acpi/ec.c Hunk #1 succeeded at 223 (offset -3 lines). Hunk #2 succeeded at 231 (offset -3 lines). Hunk #3 FAILED at 272. 1 out of 3 hunks FAILED -- saving rejects to file /usr/src/linux/drivers/acpi/ec.c.rej Created attachment 51862 [details]
refreshed patch based on 2.6.38
Hi, all,
does the problem still exists in the latest upstream kernel?
If yes, please apply this patch on top of 2.6.38 and see if it helps.
(In reply to comment #66) > does the problem still exists in the latest upstream kernel? > If yes, please apply this patch on top of 2.6.38 and see if it helps. That patch is in Fedora rawhide, and while it fixes the original problem it causes a new bug on some machines. (See comment #57 and its link to the Fedora bug report.) For sure this bug still affects 2.6.37.5 - I'm now running my laptop without battery and this bug is relevant only when a battery is inserted. I don't have the chance to test with 2.6.38 though; I will update when possible. Situation: ========== Hardware: Samsung R719 laptop (with broken touchpad, dont know if it's relevant) Distribution : Ubuntu For me the EC "buffer bla bla" error only appeared with an upgrade to 2.6.38. The boot is flooded with this message, usually hangs right there, sometimes goes on to gdm and freezes with no keyboard response. The computer has to be turned off by removing battery and power cord. I didn't have the problem before I installed Ubuntu natty that ships with kernel version 2.6.38. Also, these problems happen only after the *second boot after a non-patched install* ie the first boot is always fine? ----- What I did: =========== So I applied the ec.c patch provided by Zhang Rui in post #66 (kernel config unchanged apart from that, ie i used the generic-pae ubuntu flavour i got from the fresh install) It does indeed remove the messages and the boot can proceed, but only to find that other things are now broken: - power events (ie cord unplug) trigger root partition remounts - keyboard sometimes becomes dead as before patch - xorg is unstable I don't know if they are separate problems or not. I'll keep trying things and I'm usually posting in the downstream related bug for ubuntu (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/578506) This bug has been in NEEDINFO status for a while now. What information is needed? Any further progress on getting a patch for this that doesn't break other systems? Any additional info needed? For me, the patch is still needed on all cores from 2.6.32 to 3.1.0-rc3 (mainline 2011-08-22) Fedora in git drop acpi-ec-add-delay-before-write.patch --> http://pkgs.fedoraproject.org/gitweb/?p=kernel.git;a=commit;h=0ad4e113ad7bda9e111ec5a306c3d4d0dc40d595 With 3.1.0-rc4 without patch the same problem… ACPI: EC: input buffer is not empty, aborting transaction ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20110623/evregion-478) ACPI Error: Method parse/execution failed [\_SB_.AMW0.WMCA] (Node ffff8800ba23c730), AE_TIME (20110623/psparse-536) Created attachment 71192 [details]
dmesg on 3.1.0-rc4 kernel with error
It's great that kernel bugzilla is back. can you please verify if the problem still exists in the latest upstream kernel? Bug still there. No significant changes. Further all the necessary information for two variants: vanilla-kernel, and patched-kernel + patched-dsdt. Created attachment 72115 [details] All info for patched-3.2.1-kernel+patched-dsdt This https://github.com/init6/init_6/blob/master/sys-kernel/fc-sources/fc-sources-3.2.1.ebuild kernel with this https://github.com/init6/init_6/blob/master/sys-kernel/fc-sources/files/acpi-ec-add-delay-before-write.patch patch. Fixed dsdt in the archive. Created attachment 72116 [details]
All info for 3.2.1-vanilla-kernel
Created attachment 72117 [details]
All info for patched-3.2.1-kernel+patched-dsdt
same problem still alive with all version of kernel <= 3.2.1 ec.patch solve problem. the link in comment #77 is broken. please attach a copy of the patch that is working for you. This patch work ok for me ( i named it ec.diff ): [code] --- drivers/acpi/ec.c 2011-01-05 01:50:19.000000000 +0100 +++ drivers/acpi/ec.c 2011-01-10 15:55:23.000000000 +0100 @@ -223,6 +223,7 @@ if (ec_transaction_done(ec)) return 0; } else { + msleep(1); if (wait_event_timeout(ec->wait, ec_transaction_done(ec), msecs_to_jiffies(1))) @@ -230,8 +231,8 @@ } advance_transaction(ec, acpi_ec_read_status(ec)); } while (time_before(jiffies, delay)); - if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) - break; +// if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) +// break; pr_debug(PREFIX "controller reset, restart transaction\n"); spin_lock_irqsave(&ec->curr_lock, flags); start_transaction(ec); @@ -268,6 +269,15 @@ return (status & ACPI_EC_FLAG_IBF) == 0; } +/* try to clean input buffer with burst_disable transaction */ +static int acpi_ec_clean_buffer(struct acpi_ec *ec) +{ + struct transaction t = {.command = ACPI_EC_BURST_DISABLE, + .wdata = NULL, .rdata = NULL, + .wlen = 0, .rlen = 0}; + return acpi_ec_transaction_unlocked(ec, &t); +} + static int ec_wait_ibf0(struct acpi_ec *ec) { unsigned long delay = jiffies + msecs_to_jiffies(ec_delay); @@ -276,7 +286,8 @@ if (wait_event_timeout(ec->wait, ec_check_ibf0(ec), msecs_to_jiffies(1))) return 0; - return -ETIME; +// return -ETIME; + return acpi_ec_clean_buffer(ec); } static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t) [/code] Created attachment 73510 [details]
ec.diff patch
work with all 3.3.* version, apply ok also in 3.4.1
Hi Andrey: Could you check whether this bug exists in the latest kernel? I don't see ec.patch has been upstream. I use last 3.8.5 vanilla kernel compiled myself and this bug exist. Patch ec.diff solve problem and i have to apply. Clearing moreinfo bit. References: http://bugs.debian.org/704885 Hi, Please try the following patch. Thanks. diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 57c676a..d74fc63 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -666,16 +666,16 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address, if (function != ACPI_READ && function != ACPI_WRITE) return AE_BAD_PARAMETER; - if (EC_FLAGS_MSI || bits > 8) - acpi_ec_burst_enable(ec); +// if (EC_FLAGS_MSI || bits > 8) +// acpi_ec_burst_enable(ec); for (i = 0; i < bytes; ++i, ++address, ++value) result = (function == ACPI_READ) ? acpi_ec_read(ec, address, value) : acpi_ec_write(ec, address, *value); - if (EC_FLAGS_MSI || bits > 8) - acpi_ec_burst_disable(ec); +// if (EC_FLAGS_MSI || bits > 8) +// acpi_ec_burst_disable(ec); switch (result) { case -EINVAL: I use all kernel 2.6.32 - 3.8.6 compiled myself and this bug still exist. In the past, this bug appeared rather constant but now it has become more difficult to reproduce. On latest 3.8.6 patch ec.diff from https://bugzilla.kernel.org/show_bug.cgi?id=14733#c83 still helps. Now i try to test latest patch from you. Ok. Thanks for your effort. Is there any result ? Created attachment 97951 [details]
When search to poweroff or reboot
Hi Lan Tianyu.
I test now your patch ..not work, when poweroff computer is sloooww and at restart not start, have to remove AC and unplug battery.
For my patch from https://bugzilla.kernel.org/show_bug.cgi?id=14733#c87 not help. [ 7300.537036] ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20121018/evregion-501) [ 7300.537056] ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff8800bbc2fbe0), AE_TIME (20121018/psparse-537) [ 7300.537074] ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff8800bbc2fd70), AE_TIME (20121018/psparse-537) [ 7300.537107] ACPI Exception: AE_TIME, Evaluating _BST (20121018/battery-492) [ 7301.037042] ACPI: EC: input buffer is not empty, aborting transaction [ 7301.037050] ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20121018/evregion-501) [ 7301.037070] ACPI Error: Method parse/execution failed [\_SB_.PCI0.PEGP.VGA_.LCD_._BQC] (Node ffff8800bbc2ac58), AE_TIME (20121018/psparse-537) All other like https://bugzilla.kernel.org/show_bug.cgi?id=14733#c8 So patch not help for my. Hi Andrey & pcxz: Great thanks for your test. Could you provide dmesg with ec.c in debug mode and the following patch? diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index d45b287..9fe9a37 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -242,7 +242,7 @@ static int ec_poll(struct acpi_ec *ec) advance_transaction(ec, acpi_ec_read_status(ec)); } while (time_before(jiffies, delay)); if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) - break; + return -EAGAIN; pr_debug(PREFIX "controller reset, restart transaction\n"); spin_lock_irqsave(&ec->lock, flags); start_transaction(ec); @@ -255,19 +255,26 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, struct transaction *t) { unsigned long tmp; - int ret = 0; + int ret = 0, count = 0; + if (EC_FLAGS_MSI) udelay(ACPI_EC_MSI_UDELAY); /* start transaction */ spin_lock_irqsave(&ec->lock, tmp); /* following two actions should be kept atomic */ ec->curr = t; +retry: start_transaction(ec); if (ec->curr->command == ACPI_EC_COMMAND_QUERY) clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags); spin_unlock_irqrestore(&ec->lock, tmp); ret = ec_poll(ec); spin_lock_irqsave(&ec->lock, tmp); + if (ret == -EAGAIN && count < 10) { + pr_info("%s: retry %d \n", __func__, ++count); + goto retry; + } + ec->curr = NULL; spin_unlock_irqrestore(&ec->lock, tmp); return ret; Created attachment 98011 [details]
Dmesg full
This new patch work ok.
Attacched is full dmesg with ec debug.
Hi, Great to hear this. I see the log without ec debug info. I write a more simple patch. Please test it and attach the dmesg with ec debug opening . I write the open ec debug patch in the bottom. Thanks. diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index d45b287..6376fd2 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -223,7 +223,7 @@ static int ec_check_sci_sync(struct acpi_ec *ec, u8 state) static int ec_poll(struct acpi_ec *ec) { unsigned long flags; - int repeat = 2; /* number of command restarts */ + int repeat = 4; /* number of command restarts */ while (repeat--) { unsigned long delay = jiffies + msecs_to_jiffies(ec_delay); @@ -241,8 +241,10 @@ static int ec_poll(struct acpi_ec *ec) } advance_transaction(ec, acpi_ec_read_status(ec)); } while (time_before(jiffies, delay)); - if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) - break; + + //if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) + // break; + pr_info(PREFIX "%s: repeat %d \n", __func__, 4 - repeat); pr_debug(PREFIX "controller reset, restart transaction\n"); spin_lock_irqsave(&ec->lock, flags); start_transaction(ec); Open ec debug patch. diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index d45b287..34189f4 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -27,7 +27,7 @@ */ /* Uncomment next line to get verbose printout */ -/* #define DEBUG */ +#define DEBUG #include <linux/kernel.h> #include <linux/module.h> Created attachment 98051 [details]
Dmesg full with ec debug and also 10 minutes of work.
Also this patch seem work ok, system restart well ..no problem.
*** Bug 15560 has been marked as a duplicate of this bug. *** *** Bug 42945 has been marked as a duplicate of this bug. *** *** Bug 48221 has been marked as a duplicate of this bug. *** I will upstream the patch as soon as possible. Thanks for test. Thanks. What information would you like from submitters? (You set the state to NEEDINFO, which means you are waiting on information from them.) No, actual info is needed. Just a habit, "assigned" maybe better. I change it. Fix patch sent to acpi maillist. https://patchwork.kernel.org/patch/2521951/ The patch has been merged into linux tree. commit 28fe5c825f8e15744d04c7c1b8df197950923ecd Author: Lan Tianyu <tianyu.lan@intel.com> Date: Mon May 6 03:23:40 2013 +0000 ACPI / EC: Restart transaction even when the IBF flag set The EC driver works abnormally with IBF flag always set. IBF means "The host has written a byte of data to the command or data port, but the embedded controller has not yet read it". If IBF is set in the EC status and not cleared, this will cause all subsequent EC requests to fail with a timeout error. Change the EC driver so that it doesn't refuse to restart a transaction if IBF is set in the status. Also increase the number of transaction restarts to 5, as it turns out that 2 is not sufficient in some cases. Created attachment 105331 [details] dmesg I've suddenly got same problem with Samsung NP900X3C. Upgrading to latest 3.9.6 doesn't help. ACPI says that it's in status 0x12. But patch from https://bugzilla.kernel.org/show_bug.cgi?id=14733#c82 helped. I've attached dmesg from patched 3.9.6 kernel. |