aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-08-21 02:41:26 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-08-25 20:15:51 -0400
commit558e4736f2e1b0e6323adf7a5e4df77ed6cfc1a4 (patch)
treed9148f1564d41f5ee7ffb4591f733309dadad1bb
parent3afcf2ece453e1a8c2c6de19cdf06da3772a1b08 (diff)
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>
-rw-r--r--drivers/acpi/ec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 5e1ed318276c..9922cc46b15c 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -303,11 +303,11 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,
303 /* following two actions should be kept atomic */ 303 /* following two actions should be kept atomic */
304 ec->curr = t; 304 ec->curr = t;
305 start_transaction(ec); 305 start_transaction(ec);
306 if (ec->curr->command == ACPI_EC_COMMAND_QUERY)
307 clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
308 spin_unlock_irqrestore(&ec->lock, tmp); 306 spin_unlock_irqrestore(&ec->lock, tmp);
309 ret = ec_poll(ec); 307 ret = ec_poll(ec);
310 spin_lock_irqsave(&ec->lock, tmp); 308 spin_lock_irqsave(&ec->lock, tmp);
309 if (ec->curr->command == ACPI_EC_COMMAND_QUERY)
310 clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
311 ec->curr = NULL; 311 ec->curr = NULL;
312 spin_unlock_irqrestore(&ec->lock, tmp); 312 spin_unlock_irqrestore(&ec->lock, tmp);
313 return ret; 313 return ret;