ACPI / EC: Add command flushing support.
This patch implements the EC command flushing support. During the grace period indicated by EC_FLAGS_STARTED and EC_FLAGS_STOPPED, all submitted EC command transactions can be completed and new submissions are prevented before suspending so that the EC hardware can be ensured to be in the idle state when the system is resumed. There is a good indicator for flush support: All acpi_ec_submit_request() is invoked after checking driver state with acpi_ec_started() except the first one. This means all code paths can be flushed as fast as possible by discarding the requests occurred after the flush operation. The reference increased for such kind of code path is wrapped by acpi_ec_submit_flushable_request(). Signed-off-by: Lv Zheng <lv.zheng@intel.com> Tested-by: Ortwin Glück <odi@odi.ch> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
ad479e7f47
commit
9887d22add
@@ -122,6 +122,7 @@ struct acpi_ec {
|
||||
unsigned long data_addr;
|
||||
unsigned long global_lock;
|
||||
unsigned long flags;
|
||||
unsigned long reference_count;
|
||||
struct mutex mutex;
|
||||
wait_queue_head_t wait;
|
||||
struct list_head list;
|
||||
|
Reference in New Issue
Block a user