From nobody Wed Apr 8 14:24:56 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91DBFC38145 for ; Wed, 7 Sep 2022 16:00:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230086AbiIGQAE (ORCPT ); Wed, 7 Sep 2022 12:00:04 -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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 */ =20 @@ -320,6 +320,8 @@ void mei_stop(struct mei_device *dev) =20 mei_clear_interrupts(dev); mei_synchronize_irq(dev); + /* to catch HW-initiated reset */ + mei_cancel_work(dev); =20 mutex_lock(&dev->device_lock); =20 --=20 2.37.2