Skip to content

Commit 558e473

Browse files
Lv Zhengrafaeljw
authored andcommitted
ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC
There is platform refusing to respond QR_EC when SCI_EVT isn't set which is Acer Aspire V5-573G. By disallowing QR_EC to be issued before the previous one has been completed we are able to reduce the possibilities to trigger issues on such platforms. Note that this fix can only reduce the occurrence rate of this issue, but this issue may still occur when such a platform doesn't clear SCI_EVT before or immediately after completing the previous QR_EC transaction. This patch cannot fix the CLEAR_ON_RESUME quirk which also relies on the assumption that the platforms are able to respond even when SCI_EVT isn't set. But this patch is still useful as it can help to reduce the number of scheduled QR_EC work items. Link: https://bugzilla.kernel.org/show_bug.cgi?id=82611 Reported-and-tested-by: Alexander Mezin <mezin.alexander@gmail.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Cc: 3.16+ <stable@vger.kernel.org> # 3.16+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 3afcf2e commit 558e473

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/acpi/ec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,11 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
303303
/* following two actions should be kept atomic */
304304
ec->curr = t;
305305
start_transaction(ec);
306-
if (ec->curr->command == ACPI_EC_COMMAND_QUERY)
307-
clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
308306
spin_unlock_irqrestore(&ec->lock, tmp);
309307
ret = ec_poll(ec);
310308
spin_lock_irqsave(&ec->lock, tmp);
309+
if (ec->curr->command == ACPI_EC_COMMAND_QUERY)
310+
clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
311311
ec->curr = NULL;
312312
spin_unlock_irqrestore(&ec->lock, tmp);
313313
return ret;

0 commit comments

Comments
 (0)