Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2407251imw; Wed, 6 Jul 2022 05:32:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vWdYP5m0cheE5IzUDNoLdWQwMrc5FN9vFJuqTcRo8BfAqYRkCRF6WV34NRrkmYlbRiGeUz X-Received: by 2002:a17:90b:396:b0:1ef:99a4:3737 with SMTP id ga22-20020a17090b039600b001ef99a43737mr11229660pjb.106.1657110749622; Wed, 06 Jul 2022 05:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657110749; cv=none; d=google.com; s=arc-20160816; b=W4kVDE8IzwDrayW0AgYMh7sjDm7J0EvtX+4vIMMYQVMjlsY+wlNNiwLwn+yTMYY/N4 NAmG9aJ8XBjfs6Pi504Ioq9sd43PsgVP9tzjJCm5Q1fggpSrC5utms25j0tlzZkZn6Cu XLItwa0+aQ305Viy7dpShpp1rpLi7gLW1v9vUxxOXI16kh9E387OWHUyJbZiMsDLUnZ/ mhtx5SP/e2y+d6QG62X+mcnhJ7J0n0RhVC30PlW6YL/eyDK/+x/+RCEttgEhiGvZt9Hb c5O9LO6b68PdYSvBVOwO0lbvDIfQRTgkiGad4nfuJFmsW8gqI/7eoZ9OfZgxqHGrOoUy afqA== 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=eraTgRBkHMHLeRtBUAcg8yAiL2IcMs6eegTwu/+pBJ4=; b=nPzm811Zh/D5bq41eOiLK81oB/teatvRByh/iklaIH04qb56g/FhzMHxcG87ZdyhdD oCvXpkbKYuNjKnkeWvbiG8vxH+Q7/czPp6ZglKEWECtyLXdQnAO7pei72wc3qJFOA23M XxyFyjFlcLlA06Jj6PqAEZ9n4AmB3vLOAeVjW1zAysX+LDZDMXRlHCqxpzYWVpsDCv8K q0avl+GV8vryPRASVOW8j0UIlX/50AqnRtc4BWmJITyxpsuKj5mQrAySH914VhC/TyZs y95Ze9e975zM6aTsK7eeHKAt8M9ovbogZ0KgsR7KJgAA5HJk07cgBmVJxilZF7xMb76W fa6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iMJSeQyI; 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 z12-20020a170902708c00b0016b96b23285si29006894plk.501.2022.07.06.05.32.17; Wed, 06 Jul 2022 05:32:29 -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=iMJSeQyI; 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 S233321AbiGFLoy (ORCPT + 99 others); Wed, 6 Jul 2022 07:44:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233163AbiGFLoc (ORCPT ); Wed, 6 Jul 2022 07:44:32 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E695728701 for ; Wed, 6 Jul 2022 04:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657107866; x=1688643866; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4Fx3qCwT9GnYAYfu/bQLqPDYR4Jrdk5iw1MdeJosvVU=; b=iMJSeQyIcvPJbL9LQRGmm+rTG5hSCtX9Rr29/3XRf7AZjEDsMjW77EOT HHbqQa2AK0u/jQxOXah5RYxudUA3Jm9Yn1ozEtW1swLYOyDCpf2qUtU+x LNHfbrBVbANX18cIDTnE8REVWyclqC+rPTomI2wealVgcnDz19xf59xwy +mMx+gScpiCIwKeqwo7Y8MYsbOtSkqT9T6F7SC0x1DcjRvLpgIgs5sfEq h/8a5rdGffXN1XiAJPf6EBWL629+YmIiAVSQHezJ4FAImCARPBDSt2RZS OzCbr9aocKQahF51WWqSJ35ieJ+QI7A9FWAqhx1uSXA0US3r2CfVvnim4 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10399"; a="347707485" X-IronPort-AV: E=Sophos;i="5.92,249,1650956400"; d="scan'208";a="347707485" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 04:44:18 -0700 X-IronPort-AV: E=Sophos;i="5.92,249,1650956400"; d="scan'208";a="650630171" Received: from sannilnx.jer.intel.com ([10.12.26.175]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 04:44:15 -0700 From: Alexander Usyskin To: Greg Kroah-Hartman , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Tvrtko Ursulin Cc: Tomas Winkler , Alexander Usyskin , Vitaly Lubart , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 06/14] mei: gsc: wait for reset thread on stop Date: Wed, 6 Jul 2022 14:43:37 +0300 Message-Id: <20220706114345.1128018-7-alexander.usyskin@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220706114345.1128018-1-alexander.usyskin@intel.com> References: <20220706114345.1128018-1-alexander.usyskin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 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 | 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); -- 2.34.1