Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-27 Thread Rafael J. Wysocki
On Thursday, February 27, 2014 11:39:42 AM Kieran Clancy wrote: > On Thu, Feb 27, 2014 at 11:46 AM, Rafael J. Wysocki > wrote: > > On Thursday, February 27, 2014 11:29:53 AM Kieran Clancy wrote: > >> > >> Oh, and I should add that Juan and Dennis both helped to test the > >> patch extensively. >

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-27 Thread Rafael J. Wysocki
On Thursday, February 27, 2014 11:39:42 AM Kieran Clancy wrote: On Thu, Feb 27, 2014 at 11:46 AM, Rafael J. Wysocki r...@rjwysocki.net wrote: On Thursday, February 27, 2014 11:29:53 AM Kieran Clancy wrote: Oh, and I should add that Juan and Dennis both helped to test the patch

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Li Guang
Kieran Clancy wrote: On Thu, Feb 27, 2014 at 12:29 PM, Li Guang wrote: +#define ACPI_EC_CLEAR_MAX 20 /* Maximum number of events to query +* when trying to clear the EC */ 20 is enough? the query index is length of a byte.

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Kieran Clancy
On Thu, Feb 27, 2014 at 12:29 PM, Li Guang wrote: >> +#define ACPI_EC_CLEAR_MAX 20 /* Maximum number of events to >> query >> +* when trying to clear the EC */ >> > > > 20 is enough? > the query index is length of a byte. On my machine, 8 seems

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Li Guang
Juan Manuel Cabo wrote: On 02/27/2014 12:14 AM, Li Guang wrote: oh, sorry, I'm referring internal EC firmware code for Q event queuing, not ACPI SPEC, ;-) for machine you tested, 8 is the queue size, but for some unknown also nasty EC firmwares(let's suppose it exists), it may queue more Q

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Juan Manuel Cabo
On 02/27/2014 12:14 AM, Li Guang wrote: > oh, sorry, I'm referring internal EC firmware code > for Q event queuing, not ACPI SPEC, ;-) > for machine you tested, 8 is the queue size, > but for some unknown also nasty EC firmwares(let's suppose it exists), > it may queue more Q events. > and I saw

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Li Guang
Juan Manuel Cabo wrote: that's really nasty EC firmware! Yes! And this bug has been unsolved for about two years. 20 is enough? the query index is length of a byte. According to our humble tests, 8 is the maximum number of accumulated events. For instance, if the one

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Juan Manuel Cabo
> that's really nasty EC firmware! Yes! And this bug has been unsolved for about two years. > 20 is enough? > the query index is length of a byte. > According to our humble tests, 8 is the maximum number of accumulated events. For instance, if the one plugs or unplugs the PSU 16 times, (or

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Li Guang
Kieran Clancy wrote: A number of Samsung notebooks (530Uxx/535Uxx/540Uxx/550Pxx/900Xxx/etc) continue to log events during sleep (lid open/close, AC plug/unplug, battery level change), which accumulate in the EC until a buffer fills. After the buffer is full (tests suggest it holds 8 events),

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Kieran Clancy
On Thu, Feb 27, 2014 at 11:46 AM, Rafael J. Wysocki wrote: > On Thursday, February 27, 2014 11:29:53 AM Kieran Clancy wrote: >> >> Oh, and I should add that Juan and Dennis both helped to test the >> patch extensively. > > You can use Tested-by or Reported-and-tested-by for that. Is it okay to

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Rafael J. Wysocki
On Thursday, February 27, 2014 11:29:53 AM Kieran Clancy wrote: > On Thu, Feb 27, 2014 at 11:15 AM, Kieran Clancy > wrote: > > > > I am the primary author, but I based the loop which calls > > acpi_ec_query_unlocked() on a patch by Lan Tianyu. Juan provided the > > initial idea (userspace

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Rafael J. Wysocki
On Thursday, February 27, 2014 11:15:05 AM Kieran Clancy wrote: > On Thu, Feb 27, 2014 at 10:15 AM, Rafael J. Wysocki > wrote: > > On Thursday, February 27, 2014 02:12:40 AM Kieran Clancy wrote: > >> Signed-off-by: Kieran Clancy > >> Signed-off-by: Lan Tianyu > >> Signed-off-by: Juan Manuel

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Kieran Clancy
On Thu, Feb 27, 2014 at 11:15 AM, Kieran Clancy wrote: > > I am the primary author, but I based the loop which calls > acpi_ec_query_unlocked() on a patch by Lan Tianyu. Juan provided the > initial idea (userspace workaround), and Dennis and Lan Tianyu > reviewed and suggested some changes to the

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Kieran Clancy
On Thu, Feb 27, 2014 at 10:15 AM, Rafael J. Wysocki wrote: > On Thursday, February 27, 2014 02:12:40 AM Kieran Clancy wrote: >> Signed-off-by: Kieran Clancy >> Signed-off-by: Lan Tianyu >> Signed-off-by: Juan Manuel Cabo >> Signed-off-by: Dennis Jansen > > There are too many sign-offs under

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Rafael J. Wysocki
On Thursday, February 27, 2014 02:12:40 AM Kieran Clancy wrote: > A number of Samsung notebooks (530Uxx/535Uxx/540Uxx/550Pxx/900Xxx/etc) > continue to log events during sleep (lid open/close, AC plug/unplug, > battery level change), which accumulate in the EC until a buffer fills. > After the

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Rafael J. Wysocki
On Thursday, February 27, 2014 02:12:40 AM Kieran Clancy wrote: A number of Samsung notebooks (530Uxx/535Uxx/540Uxx/550Pxx/900Xxx/etc) continue to log events during sleep (lid open/close, AC plug/unplug, battery level change), which accumulate in the EC until a buffer fills. After the buffer

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Kieran Clancy
On Thu, Feb 27, 2014 at 10:15 AM, Rafael J. Wysocki r...@rjwysocki.net wrote: On Thursday, February 27, 2014 02:12:40 AM Kieran Clancy wrote: Signed-off-by: Kieran Clancy clancy.kie...@gmail.com Signed-off-by: Lan Tianyu tianyu@intel.com Signed-off-by: Juan Manuel Cabo

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Kieran Clancy
On Thu, Feb 27, 2014 at 11:15 AM, Kieran Clancy clancy.kie...@gmail.com wrote: I am the primary author, but I based the loop which calls acpi_ec_query_unlocked() on a patch by Lan Tianyu. Juan provided the initial idea (userspace workaround), and Dennis and Lan Tianyu reviewed and suggested

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Rafael J. Wysocki
On Thursday, February 27, 2014 11:15:05 AM Kieran Clancy wrote: On Thu, Feb 27, 2014 at 10:15 AM, Rafael J. Wysocki r...@rjwysocki.net wrote: On Thursday, February 27, 2014 02:12:40 AM Kieran Clancy wrote: Signed-off-by: Kieran Clancy clancy.kie...@gmail.com Signed-off-by: Lan Tianyu

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Rafael J. Wysocki
On Thursday, February 27, 2014 11:29:53 AM Kieran Clancy wrote: On Thu, Feb 27, 2014 at 11:15 AM, Kieran Clancy clancy.kie...@gmail.com wrote: I am the primary author, but I based the loop which calls acpi_ec_query_unlocked() on a patch by Lan Tianyu. Juan provided the initial idea

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Kieran Clancy
On Thu, Feb 27, 2014 at 11:46 AM, Rafael J. Wysocki r...@rjwysocki.net wrote: On Thursday, February 27, 2014 11:29:53 AM Kieran Clancy wrote: Oh, and I should add that Juan and Dennis both helped to test the patch extensively. You can use Tested-by or Reported-and-tested-by for that. Is it

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Li Guang
Kieran Clancy wrote: A number of Samsung notebooks (530Uxx/535Uxx/540Uxx/550Pxx/900Xxx/etc) continue to log events during sleep (lid open/close, AC plug/unplug, battery level change), which accumulate in the EC until a buffer fills. After the buffer is full (tests suggest it holds 8 events),

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Juan Manuel Cabo
that's really nasty EC firmware! Yes! And this bug has been unsolved for about two years. 20 is enough? the query index is length of a byte. According to our humble tests, 8 is the maximum number of accumulated events. For instance, if the one plugs or unplugs the PSU 16 times, (or battery

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Li Guang
Juan Manuel Cabo wrote: that's really nasty EC firmware! Yes! And this bug has been unsolved for about two years. 20 is enough? the query index is length of a byte. According to our humble tests, 8 is the maximum number of accumulated events. For instance, if the one

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Juan Manuel Cabo
On 02/27/2014 12:14 AM, Li Guang wrote: oh, sorry, I'm referring internal EC firmware code for Q event queuing, not ACPI SPEC, ;-) for machine you tested, 8 is the queue size, but for some unknown also nasty EC firmwares(let's suppose it exists), it may queue more Q events. and I saw several

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Li Guang
Juan Manuel Cabo wrote: On 02/27/2014 12:14 AM, Li Guang wrote: oh, sorry, I'm referring internal EC firmware code for Q event queuing, not ACPI SPEC, ;-) for machine you tested, 8 is the queue size, but for some unknown also nasty EC firmwares(let's suppose it exists), it may queue more Q

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Kieran Clancy
On Thu, Feb 27, 2014 at 12:29 PM, Li Guang lig.f...@cn.fujitsu.com wrote: +#define ACPI_EC_CLEAR_MAX 20 /* Maximum number of events to query +* when trying to clear the EC */ 20 is enough? the query index is length of a byte. On my

Re: [PATCH] ACPI / EC: Clear stale EC events on Samsung systems

2014-02-26 Thread Li Guang
Kieran Clancy wrote: On Thu, Feb 27, 2014 at 12:29 PM, Li Guanglig.f...@cn.fujitsu.com wrote: +#define ACPI_EC_CLEAR_MAX 20 /* Maximum number of events to query +* when trying to clear the EC */ 20 is enough? the query index is