aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Usyskin <[email protected]>2022-09-08 00:51:04 +0300
committerJoonas Lahtinen <[email protected]>2022-09-12 15:23:10 +0300
commit9b2e03e2a102f816e5f098f7ae3ecf295855ae76 (patch)
treed531e9582d979f977ee0efef136ce8b0d5552e67
parent5b063995de950d45edecf25a3eac5d8a44bd0ab9 (diff)
mei: gsc: wait for reset thread on stop
Wait for reset work to complete before initiating stop reset flow sequence. Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Reviewed-by: Daniele Ceraolo Spurio <[email protected]> Signed-off-by: Daniele Ceraolo Spurio <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Joonas Lahtinen <[email protected]>
-rw-r--r--drivers/misc/mei/init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index eb052005ca86..bc054baf496c 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (c) 2012-2019, Intel Corporation. All rights reserved.
+ * Copyright (c) 2012-2022, Intel Corporation. All rights reserved.
* Intel Management Engine Interface (Intel MEI) Linux driver
*/
@@ -320,6 +320,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);