Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5884854rwb; Wed, 7 Sep 2022 09:17:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR6EdsKf/OCurq8gUPoFnAqYd121ZVnm8SLHD5Cf1NVPGOvS6pCwIZCx4ns7/CXWAhV0r0CK X-Received: by 2002:a05:6402:1b06:b0:44e:a073:1dd8 with SMTP id by6-20020a0564021b0600b0044ea0731dd8mr3647342edb.391.1662567460781; Wed, 07 Sep 2022 09:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662567460; cv=none; d=google.com; s=arc-20160816; b=Ol/VS5hqpHGZbf/52nQirv+nOWExXObu3dFtUlqak3K5jPtVUZNCj+mKABI/oXS5NL eLiOIrBN4DrmUg4C773b06pVBTLEF3za05McfLNQSwR9hw6FYsg6X27Tz7Gf1tvALU6J IJrzKoi87rwUvZ6j8xuSaF9nrONMAR/8C5b2StLCJg2kuAM//g4iD4Ue412hKoA7No2j NTOP4lHVApQO5G0hsXMqJaklQve/G54zhOEZtOsoPdff+jYDMgSLalEMnYlmj2KH0sPI kAvJrxSZ3hCXnMZWRattm2e6tiecMHHC2cqovvC36LhuAfjSXulXsYo3pgSCbWNPHFiq QHFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4XiGLZ4EIcZNO8lys93sKNiXdHBtQ4iUcI33BCPY1FE=; b=lYMJyHssAmuTCxHb7xFEOmyBonNB3gA6Ojr1JR5sajvP2dh2B3+GHc1VzFcO5QFh4Q aQpiNNGyxXENOFK8HMAuJTZxVA6evzP2lIy/SmzaaZvkkqxdLyy2XZD9/ieAjraqW0c7 xC8OuSQXpdl05yyXnytX4Dlkn18R6fpQYwEjcbRi3kXw17RW/taFPobLWtxN2XT5Wa5Q oSJK/JBIugIj+cc/EAn2u87qfh/PR3LiPU43m8ECx6rT3/ykzqFYzJpeo2/txFXTlqqV wLupyI96zve12gF0FOKrmTx6D60KwY0LpiCpiTuoULMYlo1TYoSobXmMJGU8o/XbT3U4 v2ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MQLn8MyV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm10-20020a170907948a00b0072b580c899dsi12580606ejc.71.2022.09.07.09.17.13; Wed, 07 Sep 2022 09:17:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MQLn8MyV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230180AbiIGQAB (ORCPT + 99 others); Wed, 7 Sep 2022 12:00:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229808AbiIGP7s (ORCPT ); Wed, 7 Sep 2022 11:59:48 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6968611C3B for ; Wed, 7 Sep 2022 08:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662566374; x=1694102374; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2LoTcrDdIIjhQQzEoUzp6PWW1yQHSMcHmGudjZ75118=; b=MQLn8MyVXk+5ejEzOhi3Ygng3PdjtiLn1f9FG4KDuTaMlwdu0NICSfdA dgd1Z7FL64hUh1KppAy5Q0VosFyAG2M2EVEDS1+IVyeJf0ZW0bcsKt4iz wO+qlmrHBO7YjysqLtAcsE9g4oGhpZo2HnFSMgzw/VjeJrU6jaoQz9H8Z OwG3Wuj3NqhEGsfw/hKcYjotDw05TcwN4JdaM9GnZ8Hv7ZUyPhrt6jKTY J9lvfGKLf91/sXLldWQwB5aa3lHpUfyxRFl+0IZwEhdXInBy520Kh+RBX H+6eWKxx6iL+FV9o4QP3kgjbTgPzVILWEfccUElY9sAqo7k/J/RO39MG8 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10463"; a="297701322" X-IronPort-AV: E=Sophos;i="5.93,297,1654585200"; d="scan'208";a="297701322" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2022 08:59:11 -0700 X-IronPort-AV: E=Sophos;i="5.93,297,1654585200"; d="scan'208";a="676247865" Received: from twinkler-lnx.jer.intel.com ([10.12.87.143]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2022 08:59:07 -0700 From: Tomas Winkler To: Greg Kroah-Hartman , David Airlie , Daniel Vetter Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tomas Winkler , Alexander Usyskin , Vitaly Lubart Subject: [PATCH v8 07/16] mei: gsc: wait for reset thread on stop Date: Wed, 7 Sep 2022 18:58:04 +0300 Message-Id: <20220907155813.1427526-8-tomas.winkler@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220907155813.1427526-1-tomas.winkler@intel.com> References: <20220907155813.1427526-1-tomas.winkler@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Usyskin Wait for reset work to complete before initiating stop reset flow sequence. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler --- drivers/misc/mei/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.37.2