Commit 17e9c78a authored by Luming Yu's avatar Luming Yu Committed by Len Brown
parent a27ac38e
...@@ -282,7 +282,7 @@ end: ...@@ -282,7 +282,7 @@ end:
if(atomic_read(&ec->leaving_burst) == 2){ if(atomic_read(&ec->leaving_burst) == 2){
ACPI_DEBUG_PRINT((ACPI_DB_INFO,"aborted, retry ...\n")); ACPI_DEBUG_PRINT((ACPI_DB_INFO,"aborted, retry ...\n"));
while(!atomic_read(&ec->pending_gpe)){ while(atomic_read(&ec->pending_gpe)){
msleep(1); msleep(1);
} }
acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR); acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);
...@@ -365,7 +365,7 @@ end: ...@@ -365,7 +365,7 @@ end:
if(atomic_read(&ec->leaving_burst) == 2){ if(atomic_read(&ec->leaving_burst) == 2){
ACPI_DEBUG_PRINT((ACPI_DB_INFO,"aborted, retry ...\n")); ACPI_DEBUG_PRINT((ACPI_DB_INFO,"aborted, retry ...\n"));
while(!atomic_read(&ec->pending_gpe)){ while(atomic_read(&ec->pending_gpe)){
msleep(1); msleep(1);
} }
acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR); acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);
...@@ -431,7 +431,6 @@ acpi_ec_query ( ...@@ -431,7 +431,6 @@ acpi_ec_query (
if (!ec || !data) if (!ec || !data)
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
retry:
*data = 0; *data = 0;
if (ec->global_lock) { if (ec->global_lock) {
...@@ -469,13 +468,9 @@ end: ...@@ -469,13 +468,9 @@ end:
if(atomic_read(&ec->leaving_burst) == 2){ if(atomic_read(&ec->leaving_burst) == 2){
ACPI_DEBUG_PRINT((ACPI_DB_INFO,"aborted, retry ...\n")); 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); acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);
goto retry; status = -ENODATA;
} }
return_VALUE(status); return_VALUE(status);
} }
...@@ -514,8 +509,8 @@ acpi_ec_gpe_query ( ...@@ -514,8 +509,8 @@ acpi_ec_gpe_query (
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Evaluating %s\n", object_name)); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Evaluating %s\n", object_name));
acpi_evaluate_object(ec->handle, object_name, NULL, NULL); acpi_evaluate_object(ec->handle, object_name, NULL, NULL);
atomic_dec(&ec->pending_gpe);
end: end:
atomic_dec(&ec->pending_gpe);
return; return;
} }
...@@ -553,7 +548,7 @@ acpi_ec_gpe_handler ( ...@@ -553,7 +548,7 @@ acpi_ec_gpe_handler (
!(value & ACPI_EC_FLAG_IBF))) { !(value & ACPI_EC_FLAG_IBF))) {
ec->expect_event = 0; ec->expect_event = 0;
wake_up(&ec->wait); wake_up(&ec->wait);
return ACPI_INTERRUPT_HANDLED;
} }
} }
...@@ -561,8 +556,10 @@ acpi_ec_gpe_handler ( ...@@ -561,8 +556,10 @@ acpi_ec_gpe_handler (
atomic_add(1, &ec->pending_gpe) ; atomic_add(1, &ec->pending_gpe) ;
status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE, status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE,
acpi_ec_gpe_query, ec); 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 ? return status == AE_OK ?
ACPI_INTERRUPT_HANDLED : ACPI_INTERRUPT_NOT_HANDLED; ACPI_INTERRUPT_HANDLED : ACPI_INTERRUPT_NOT_HANDLED;
} }
...@@ -688,6 +685,7 @@ acpi_ec_read_info (struct seq_file *seq, void *offset) ...@@ -688,6 +685,7 @@ acpi_ec_read_info (struct seq_file *seq, void *offset)
(u32) ec->status_addr.address, (u32) ec->data_addr.address); (u32) ec->status_addr.address, (u32) ec->data_addr.address);
seq_printf(seq, "use global lock: %s\n", seq_printf(seq, "use global lock: %s\n",
ec->global_lock?"yes":"no"); ec->global_lock?"yes":"no");
acpi_enable_gpe(NULL, ec->gpe_bit, ACPI_NOT_ISR);
end: end:
return_VALUE(0); return_VALUE(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment