Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4741
b: refs/heads/master
c: 17e9c78
h: refs/heads/master
i:
  4739: 2633a0e
v: v3
  • Loading branch information
Luming Yu authored and Len Brown committed Jul 12, 2005
1 parent 727553a commit 96035dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 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: a27ac38efd6dc6dccebfc9bcc475ab4aa5fc4a56
refs/heads/master: 17e9c78a75ce9eacd61200f9e1f1924012e28846
20 changes: 9 additions & 11 deletions trunk/drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ acpi_ec_read (

if(atomic_read(&ec->leaving_burst) == 2){
ACPI_DEBUG_PRINT((ACPI_DB_INFO,"aborted, retry ...\n"));
while(!atomic_read(&ec->pending_gpe)){
while(atomic_read(&ec->pending_gpe)){
msleep(1);
}
acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);
Expand Down Expand Up @@ -365,7 +365,7 @@ acpi_ec_write (

if(atomic_read(&ec->leaving_burst) == 2){
ACPI_DEBUG_PRINT((ACPI_DB_INFO,"aborted, retry ...\n"));
while(!atomic_read(&ec->pending_gpe)){
while(atomic_read(&ec->pending_gpe)){
msleep(1);
}
acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);
Expand Down Expand Up @@ -431,7 +431,6 @@ acpi_ec_query (

if (!ec || !data)
return_VALUE(-EINVAL);
retry:
*data = 0;

if (ec->global_lock) {
Expand Down Expand Up @@ -469,13 +468,9 @@ acpi_ec_query (

if(atomic_read(&ec->leaving_burst) == 2){
ACPI_DEBUG_PRINT((ACPI_DB_INFO,"aborted, retry ...\n"));
while(!atomic_read(&ec->pending_gpe)){
msleep(1);
}
acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);
goto retry;
status = -ENODATA;
}

return_VALUE(status);
}

Expand Down Expand Up @@ -514,8 +509,8 @@ acpi_ec_gpe_query (
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Evaluating %s\n", object_name));

acpi_evaluate_object(ec->handle, object_name, NULL, NULL);
atomic_dec(&ec->pending_gpe);
end:
atomic_dec(&ec->pending_gpe);
return;
}

Expand Down Expand Up @@ -553,16 +548,18 @@ acpi_ec_gpe_handler (
!(value & ACPI_EC_FLAG_IBF))) {
ec->expect_event = 0;
wake_up(&ec->wait);

return ACPI_INTERRUPT_HANDLED;
}
}

if (value & ACPI_EC_FLAG_SCI){
atomic_add(1, &ec->pending_gpe) ;
status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
acpi_ec_gpe_query, ec);
return status == AE_OK ?
ACPI_INTERRUPT_HANDLED : ACPI_INTERRUPT_NOT_HANDLED;
}

acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_ISR);
return status == AE_OK ?
ACPI_INTERRUPT_HANDLED : ACPI_INTERRUPT_NOT_HANDLED;
}
Expand Down Expand Up @@ -688,6 +685,7 @@ acpi_ec_read_info (struct seq_file *seq, void *offset)
(u32) ec->status_addr.address, (u32) ec->data_addr.address);
seq_printf(seq, "use global lock: %s\n",
ec->global_lock?"yes":"no");
acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);

end:
return_VALUE(0);
Expand Down

0 comments on commit 96035dc

Please sign in to comment.