All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Seblu <seblu@seblu.net>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	Len Brown <lenb@kernel.org>
Subject: Re: Bad AC adaptateur value trought sysfst
Date: Tue, 02 Nov 2010 09:16:35 +0800	[thread overview]
Message-ID: <1288660595.2234.164.camel@rui> (raw)
In-Reply-To: <AANLkTin517i-Ld_rNRxjmt65hiVpT3bC3wCrL43weiu7@mail.gmail.com>

On Tue, 2010-11-02 at 04:10 +0800, Seblu wrote:
> On Mon, Nov 1, 2010 at 1:44 AM, Zhang Rui <rui.zhang@intel.com> wrote:
> > will you please attach the acpidump output of this laptop?
> yes, sure.

does the error message pop up every time you boot the kernel?

> > please try the patch attached to see if it helps.
> > BTW, the patch is based on today's git tree. and there may be some
> > conflict if you use 2.6.36 kernel.
> Right, i join my version to test it on 2.6.35.8.
> 
> I've tested after many startup (from shutdown or reboot) on 2.6.35.8
> and on linux-next-2010-10-29 and this seems to fix the issue. Thanks!
> 
good to know.
But I'm still confused about this problem.
you can get the notifications every time you plug or unplug the AC
adapter, right?

here is how ACPI AC driver works:
1. plug/unplug AC
2. AC driver receives notification (done by BIOS)
3. update the AC status (in notification hander)
4. send notification to userspace (in notification handler)
5. user space query AC status when receiving the notification

as we can see, the AC status is already updated in step 3, that's why AC
driver returns a cached value to user space in step 5.
But apparently this is broken in your case.

This makes me wondering if BIOS forgets to do step 2, thus AC driver
does not update the AC status. But you can catch the AC plug/unplug
event every time which suggest the notification is sent correctly.

Seblu,
will you please plug and unplug the AC adapter for several times and
attach the output of "grep . /sys/firmware/acpi/interrupts/*" every time
you plug or unplug the AC adapter?

> I think we have the same bug on battery module, because sometimes i
> need to cat /proc/acpi/battery/BAT*/state do have a proper report of
> battery level. Do you have a patch for this too?
> 
I'll cook up one soon. :) thanks for remindering.

thanks,
rui



  parent reply	other threads:[~2010-11-02  1:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-31 18:35 Bad AC adaptateur value trought sysfst Seblu
2010-11-01  0:44 ` Zhang Rui
     [not found]   ` <AANLkTin517i-Ld_rNRxjmt65hiVpT3bC3wCrL43weiu7@mail.gmail.com>
2010-11-02  1:16     ` Zhang Rui [this message]
2010-11-02  1:50       ` Seblu

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=1288660595.2234.164.camel@rui \
    --to=rui.zhang@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=seblu@seblu.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.