From: Len Brown <lenb@kernel.org>
To: Alexey Starikovskiy <astarikovskiy@suse.de>
Cc: Linux-acpi@vger.kernel.org
Subject: Re: [PATCH 4/5] ACPI: EC: Add workaround for "optimized" controllers
Date: Fri, 12 Oct 2007 18:42:55 -0400 [thread overview]
Message-ID: <200710121842.55315.lenb@kernel.org> (raw)
In-Reply-To: <20071008221924.7071.75243.stgit@samsung>
I'd like to see a (single) printk when we enter this hybrid mode also,
as we want to find out how common it is - does it happen just
on FSC machines, or others also.
thanks,
-Len
On Monday 08 October 2007 06:19:24 pm Alexey Starikovskiy wrote:
> Some controllers do not send interrupts for OBF=1 event, but send
> them for IBF=0. Add workaround for them.
>
> Reference: http://bugzilla.kernel.org/show_bug.cgi?id=8459
>
> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
> ---
>
> drivers/acpi/ec.c | 10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
> index fa3f2aa..91eb94a 100644
> --- a/drivers/acpi/ec.c
> +++ b/drivers/acpi/ec.c
> @@ -75,6 +75,7 @@ enum {
> EC_FLAGS_WAIT_GPE = 0, /* Don't check status until GPE arrives */
> EC_FLAGS_QUERY_PENDING, /* Query is pending */
> EC_FLAGS_GPE_MODE, /* Expect GPE to be sent for status change */
> + EC_FLAGS_ONLY_IBF_GPE, /* Expect GPE only for IBF = 0 event */
> };
>
> static int acpi_ec_remove(struct acpi_device *device, int type);
> @@ -172,7 +173,12 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll)
> return 0;
> clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
> if (acpi_ec_check_status(ec, event)) {
> - clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
> + if (event == ACPI_EC_EVENT_OBF_1)
> + /* miss OBF = 1 GPE, don't expect it anymore */
> + set_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags);
> + else
> + /* missing GPEs, switch back to poll mode */
> + clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
> return 0;
> }
> } else {
> @@ -220,6 +226,8 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command,
> clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
>
> for (; rdata_len > 0; --rdata_len) {
> + if (test_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags))
> + force_poll = 1;
> result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1, force_poll);
> if (result) {
> printk(KERN_ERR PREFIX "read timeout, command = %d\n",
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2007-10-12 22:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071008221906.7071.63939.stgit@samsung>
[not found] ` <20071008221918.7071.72288.stgit@samsung>
2007-10-12 22:41 ` [PATCH 3/5] ACPI: EC: auto select interrupt mode Len Brown
[not found] ` <20071008221924.7071.75243.stgit@samsung>
2007-10-12 22:42 ` Len Brown [this message]
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=200710121842.55315.lenb@kernel.org \
--to=lenb@kernel.org \
--cc=Linux-acpi@vger.kernel.org \
--cc=astarikovskiy@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).