diff mbox series

[6/7] mei: gsc: wait for reset thread on stop

Message ID 20220222104854.3188643-7-alexander.usyskin@intel.com (mailing list archive)
State New, archived
Headers show
Series add support for GSC in XeHP SDV platform | expand

Commit Message

Alexander Usyskin Feb. 22, 2022, 10:48 a.m. UTC
Wait for reset work to complete before initiating
stop reset flow sequence.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/init.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index f79076c67256..873fa96fa29c 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -315,6 +315,8 @@  void mei_stop(struct mei_device *dev)
 
 	mei_clear_interrupts(dev);
 	mei_synchronize_irq(dev);
+	/* to catch HW-initiated reset */
+	mei_cancel_work(dev);
 
 	mutex_lock(&dev->device_lock);