]> git.baikalelectronics.ru Git - kernel.git/commit
HID: intel-ish-hid: use async resume function
authorYe Xiang <xiang.ye@intel.com>
Sun, 13 Jun 2021 03:25:07 +0000 (11:25 +0800)
committerJiri Kosina <jkosina@suse.cz>
Thu, 15 Jul 2021 18:49:09 +0000 (20:49 +0200)
commit352a7ace7bcd6a62fb64db380ea7440cb3783c4d
treeaccc6d0cf319fcbb302e9ef2988e7f1fa22057d3
parent703fa3ac0c74a9be62f102ad87341ef247c5729b
HID: intel-ish-hid: use async resume function

ISH IPC driver uses asynchronous workqueue to do resume now, but there is
a potential timing issue: when child devices resume before bus driver, it
will cause child devices resume failed and cannot be recovered until
reboot. The current implementation in this case do wait for IPC to resume
but fail to accommodate for a case when there is no ISH reboot and soft
resume is taking time. This issue is apparent on Tiger Lake platform with
5.11.13 kernel when doing suspend to idle then resume(s0ix) test. To
resolve this issue, we change ISHTP HID client to use asynchronous resume
callback too. In the asynchronous resume callback, it waits for the ISHTP
resume done event, and then notify ISHTP HID client link ready.

Signed-off-by: Ye Xiang <xiang.ye@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/intel-ish-hid/ishtp-hid-client.c
drivers/hid/intel-ish-hid/ishtp-hid.h
drivers/hid/intel-ish-hid/ishtp/bus.c
include/linux/intel-ish-client-if.h