Received: by 2002:a05:6512:3a82:0:0:0:0 with SMTP id q2csp541601lfu; Mon, 25 Apr 2022 04:20:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXP9CxjN7ePpnoTumGlPWOTZizraJRA90lF/0rgzEusFNhZcAraKu3Xs2CyTQTL8xOY2dn X-Received: by 2002:a05:6402:1941:b0:413:2b5f:9074 with SMTP id f1-20020a056402194100b004132b5f9074mr18173244edz.414.1650885659358; Mon, 25 Apr 2022 04:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650885659; cv=none; d=google.com; s=arc-20160816; b=aAfy4R9PhuxFhfI4aS5O/xFrS3rpFOUEBDCEQxbGH9YTDyo+XRW9jlXHMSX+KaAx3e TsIo6ArWhazmTUteE0r/rK/p1FMF6rA2t5MU5Tpb4+3SZv6tH81rjhiH+FrnVmMIEOfw U+FB3TBxStbiIcHm43MrZjMNRL9nGEJXRJ9ndZQAN/U4PwyOtTmNtPK4WAp9QSZ7ZQSl dKNJbwAbXoKGcDdirUnLeQhp3X072HzxXr8eRfe3p1w+WfGsjGrc0sZPfNoNgVO5cxlL rZ7GAxvusXKU+b0FBHQtxvLmxUmcYyHdlskZDy/VnkfXvmNcvnod+etvkYgWv7jMtXtI ICIw== 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=d6QJ/aKUFewGwItG8Bi/+O8tWP4nAri3oPyQnDhn3XY=; b=JhmdVY/ywi7hlXSBqusT+7lzsRM6Jt4fTS7G1wttx/leo7E//RfJ7nSNlvLeaTCJsr KCdIAEdHsco+zXa/vz5QvmKE/ycTnhW9AyNYohmAQ/6EReTUMv91lecuNM+Zg0JLDqWk igp3P+kVSZ69vMZVCTQAvBFXypIn54XzlDJB7imR0uUBb+jpw8QiWijQU5qdM1FTmPpr BeIV11FSLDQp/Y9NrFKWEtHoe188om1hI8q0rKydNpjIf8+Qa1uLUP4HsHboEnPq2OO7 ilbaAN2tNIyb2mUZ/YURb3LvFhZcBIuK35yA2k4gaHc9LBdUCJ+rUEDSKNs1H9OlEN8b 3sGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=F4YpgJKA; 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 m11-20020a170906848b00b006f3a3826555si452963ejx.640.2022.04.25.04.20.33; Mon, 25 Apr 2022 04:20:59 -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=F4YpgJKA; 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 S241461AbiDYHxl (ORCPT + 99 others); Mon, 25 Apr 2022 03:53:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241476AbiDYHwn (ORCPT ); Mon, 25 Apr 2022 03:52:43 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31F9CD0 for ; Mon, 25 Apr 2022 00:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650872977; x=1682408977; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bnSUp6cwq6Caf0TGHF8XKZbohNnmqtwjwu8uNCq5o18=; b=F4YpgJKAUDcLtX1SReQjDkcu4uwC0Ed8f9niz+Jl0l/bsuPQ6c5kIUS2 KSZ6Q3nj6CR3trHP3oq4u71jK5tzmE9Keg/Wq6uRICLeYIbaOIZnh1p71 bo6OE9VX2kr4f9AQbx3w1O7yzpxH+8A/kSRTpCHlKBwwjraWvkgGlN+qp FuSdOWKaXi7NC26NY1CJqXrOKIixk6bETVek3xtwPuizi8wCyi+Ig66li jEifYH+wThrkoW+gEE+hl1iHjJDKuYgRYeZvUmgPpWmeOXX9CDkuNee97 WkQcjnA2ZeU6Ov0uIt/aIZk5jMbE0iWJe4esRCYjJ+FVVLSG0toKM9UhP w==; X-IronPort-AV: E=McAfee;i="6400,9594,10327"; a="264973724" X-IronPort-AV: E=Sophos;i="5.90,287,1643702400"; d="scan'208";a="264973724" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2022 00:49:36 -0700 X-IronPort-AV: E=Sophos;i="5.90,287,1643702400"; d="scan'208";a="557599970" Received: from sannilnx.jer.intel.com ([10.12.231.73]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2022 00:49:33 -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 v2 07/14] mei: gsc: wait for reset thread on stop Date: Mon, 25 Apr 2022 10:48:54 +0300 Message-Id: <20220425074901.3991274-8-alexander.usyskin@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220425074901.3991274-1-alexander.usyskin@intel.com> References: <20220425074901.3991274-1-alexander.usyskin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 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 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.32.0