public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Sergey Dolgov <solkaa@gmail.com>, Hugh Dickins <hugh@veritas.com>,
	Len Brown <len.brown@intel.com>,
	Norbert Preining <preining@logic.at>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Henrique de Moraes Holshuh <hmh@hmh.eng.br>,
	Michal Piotrowski <michal.k.k.piotrowski@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: 2.6.23-rc3 regression and bisection query
Date: Tue, 14 Aug 2007 02:10:35 +0400	[thread overview]
Message-ID: <46C0D6DB.7090703@suse.de> (raw)
In-Reply-To: <20070813212204.GA2645@slk.laptop>

[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]

Sergey Dolgov wrote:
> On Mon, Aug 13, 2007 at 07:44:48PM +0100, Hugh Dickins wrote:
>
>   
>> Git bisection (with manual fixups to i386 mmiocfg horror, thanks
>> for drawing attention to that in your changelog) accuses Alexey's
>> ACPI: EC: If ECDT is not found, look up EC in DSDT
>> cd8c93a4e04dce8f00d1ef3a476aac8bd65ae40b
>> and if I revert that along with Len's subsequent
>> ACPI: EC: fix build warning
>> 52fe4bdf40bc07498c5f7935551774e8f8458190
>> then I have Fn-F4 suspending to RAM again.
>>
>>     
>
> I've also noticed a regression since -rc2 in battery status reporting
> on my HP nx7300 laptop: the output of
>
>     cat /proc/acpi/battery/C1BE/state
>
> does not change after this file has been read for the the first time;
> for exaple, the line "charging state: charged" does not change to
> "charging state: discharging" upon unplugging the power cord.
>
> Reverting the above 2 commits fixes this issue for me.
>
> --
> Sergey
>   
Function to register query methods (means by which EC talks to ACPI)
was deleted by mistake.

Could you please try the attached patch?

Sorry for all the trouble, and thanks for bisect.
Alex.

[-- Attachment #2: acpi-ec-fix-regression --]
[-- Type: text/plain, Size: 1382 bytes --]

ACPI: EC: Fix regression

From: Alexey Starikovskiy <astarikivskiy@suse.de>

Undelete call to register query methods. 

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---

 drivers/acpi/ec.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 2300d81..56bee9e 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -652,6 +652,19 @@ static struct acpi_ec *make_acpi_ec(void)
 }
 
 static acpi_status
+acpi_ec_register_query_methods(acpi_handle handle, u32 level,
+			       void *context, void **return_value)
+{
+	struct acpi_namespace_node *node = handle;
+	struct acpi_ec *ec = context;
+	int value = 0;
+	if (sscanf(node->name.ascii, "_Q%x", &value) == 1) {
+		acpi_ec_add_query_handler(ec, value, handle, NULL, NULL);
+	}
+	return AE_OK;
+}
+
+static acpi_status
 ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
 {
 	acpi_status status;
@@ -668,6 +681,10 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
 	if (ACPI_FAILURE(status))
 		return status;
 
+	/* Find and register all query methods */
+	acpi_walk_namespace(ACPI_TYPE_METHOD, handle, 1,
+			    acpi_ec_register_query_methods, ec, NULL);
+
 	/* Use the global lock for all EC transactions? */
 	acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock);
 

  reply	other threads:[~2007-08-13 22:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13 18:44 2.6.23-rc3 regression and bisection query Hugh Dickins
2007-08-13 20:29 ` Michal Piotrowski
2007-08-13 21:22 ` Sergey Dolgov
2007-08-13 22:10   ` Alexey Starikovskiy [this message]
2007-08-13 22:56     ` Hugh Dickins
2007-08-14  7:54       ` Sergey Dolgov
     [not found]     ` <46C0D35B.5030104@suse.de>
2007-08-14  7:09       ` [Fwd: Re: 2.6.23-rc3 regression and bisection query] Norbert Preining
2007-08-14 16:18         ` Len Brown
2007-08-14 16:33           ` Norbert Preining
2007-08-14 16:41             ` Alexey Starikovskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46C0D6DB.7090703@suse.de \
    --to=astarikovskiy@suse.de \
    --cc=hmh@hmh.eng.br \
    --cc=hugh@veritas.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.k.k.piotrowski@gmail.com \
    --cc=preining@logic.at \
    --cc=solkaa@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox