diff mbox series

[v7,07/15] mei: gsc: wait for reset thread on stop

Message ID 20220806122636.43068-8-tomas.winkler@intel.com (mailing list archive)
State New, archived
Headers show
Series GSC support for XeHP SDV and DG2 | expand

Commit Message

Winkler, Tomas Aug. 6, 2022, 12:26 p.m. UTC
From: Alexander Usyskin <alexander.usyskin@intel.com>

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(+)

Comments

Daniele Ceraolo Spurio Sept. 1, 2022, 4:07 p.m. UTC | #1
On 8/6/2022 5:26 AM, Tomas Winkler wrote:
> From: Alexander Usyskin <alexander.usyskin@intel.com>
>
> 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>

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Daniele

> ---
>   drivers/misc/mei/init.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
> index eb052005ca86..5bb6ba662cc0 100644
> --- a/drivers/misc/mei/init.c
> +++ b/drivers/misc/mei/init.c
> @@ -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);
>
diff mbox series

Patch

diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index eb052005ca86..5bb6ba662cc0 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -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);