Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72819
b: refs/heads/master
c: 66c5f4e
h: refs/heads/master
i:
  72817: 2c8413e
  72815: a2fe0f6
v: v3
  • Loading branch information
Alexey Starikovskiy authored and Len Brown committed Oct 25, 2007
1 parent 98a8f84 commit cd0afb4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c55053c21706ccf1fdb26b4bb6d05c4a2782ffe
refs/heads/master: 66c5f4e7367b0085652931b2f3366de29e7ff5ec
10 changes: 9 additions & 1 deletion trunk/drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit cd0afb4

Please sign in to comment.