From: Alexander Usyskin Date: Wed, 7 Sep 2022 21:51:04 +0000 (+0300) Subject: mei: gsc: wait for reset thread on stop X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9b2e03e2a102f816e5f098f7ae3ecf295855ae76;p=linux.git 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 Signed-off-by: Tomas Winkler Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20220907215113.1596567-8-tomas.winkler@intel.com Acked-by: Greg Kroah-Hartman Signed-off-by: Joonas Lahtinen --- diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index eb052005ca86d..bc054baf496ca 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);