Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp42020pxh; Thu, 7 Apr 2022 13:23:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwy+IKdzyF6C8goR9d1hxtd4+HfbFqn0GeTcl7JionryrLo12ncKb/b/OWk0qO984g8HoT6 X-Received: by 2002:a17:90a:ee84:b0:1ca:c87c:1b22 with SMTP id i4-20020a17090aee8400b001cac87c1b22mr17579119pjz.178.1649363031384; Thu, 07 Apr 2022 13:23:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649363031; cv=none; d=google.com; s=arc-20160816; b=yd04V4GGmhxcTnWvGzNYjdphmoXVvECgF7FqLQJF5liKo4r+Rpmi1d4nDKR2ofgL6a JkJVRGfRYm9qQYnCSEBBqmSf551sBiMNWdL4XiqKOeGlCf0zPFLgvAbo6ZyC20KZJua1 4b29JiEFQdy9yvol04I7uZvc7CfBiFhJboBUHNGixWsDjrS3Rx3j0sRctNHcHHg0sxd+ gTTYPgfjPgzWMQSw6MaYCEGwcYOLyzjeUiDaegGaKEt2ehW1VoIKt7VtVQGSCpQkW//s SEz0BPh1cHCgf1/2oy0ddrrgb+UYbMMHApZ5+aQGoqPUZg/EIhEzoAgvYGVfuZaFXvX7 u7KQ== 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=eyyTnZBgqoKqnA/fjMKBHsvYDvmb/3Ah2VWFTd7/GEbcXDxUBmkC3/oiTpVCRsKq5A m4v7D27Q9h8/AP5vMF34Flapl8aDR0d2lH1aXslQGr/mPbWlYOPFv+Dxc2eyKXIj5VcZ nVkMI/vUU3vcVGqba0+N92YEuDxL3F3arQa4bqQ7cNeaoq/ZBbE77uKAOf4ESAvLIBtG KCO1nsssGqd7uA4YZMXSCnzHs6voXpy0Wbw3YeYq7Czi2qXll2y5nQTsk9rYH8Lhq3Js FO8cOyGAvBlNIEz4Pli7Yy2xnGInqoH8OXXPisZCjRKyBoLZtM60f3GPOqh8Doyy8vmg 39jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N+UOWyEQ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t5-20020a17090a024500b001ca2f879341si2719753pje.16.2022.04.07.13.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:23:51 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N+UOWyEQ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0303A36232D; Thu, 7 Apr 2022 12:42:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245684AbiDGNFL (ORCPT + 99 others); Thu, 7 Apr 2022 09:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245686AbiDGNC3 (ORCPT ); Thu, 7 Apr 2022 09:02:29 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 823DD9F38A for ; Thu, 7 Apr 2022 06:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649336415; x=1680872415; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bnSUp6cwq6Caf0TGHF8XKZbohNnmqtwjwu8uNCq5o18=; b=N+UOWyEQkOcg3+oSHwHwZ7du8uIrXlwMc6At+Ul391xH+4IZdKGqwNNQ huWGp2SkuAazzpR2hsxb9FUEB0v50DNnJRm5gZUiZnOlWugXmFdf2muAt 4oO85q5PU9gThqXIsCxFKgOJL6x2cCNKac0Qs2jeAxB6rr3IP+xHfuN3w h65grxe+B/NAZWzpvdruZoqaadbYZwxWmdolQrBOnmtZuRs1wu3stu/Gh +VyPYwcL0sszSMOv4XJTrnFd6k0JZYADbIR6tNe1ZzHQHwyOrHbhA0xQS jzipzA5JMwMWpTJqe963vZbZfE0dZWqt2pYgMF745jQlqUl42IqIVt9m5 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10309"; a="248842022" X-IronPort-AV: E=Sophos;i="5.90,242,1643702400"; d="scan'208";a="248842022" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 06:00:14 -0700 X-IronPort-AV: E=Sophos;i="5.90,242,1643702400"; d="scan'208";a="571041131" Received: from sannilnx.jer.intel.com ([10.12.231.73]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 06:00:07 -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 12/20] mei: gsc: wait for reset thread on stop Date: Thu, 7 Apr 2022 15:58:31 +0300 Message-Id: <20220407125839.1479249-13-alexander.usyskin@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220407125839.1479249-1-alexander.usyskin@intel.com> References: <20220407125839.1479249-1-alexander.usyskin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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