Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp229126rwn; Wed, 7 Sep 2022 15:40:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR5W6CXeI8FRfNBxjO832hBnrCY81BZPlhdIUx+ac2VJaFWxVfCOh/Tw71ER8fn2tS1a4uqz X-Received: by 2002:a17:907:60c7:b0:731:14e2:af10 with SMTP id hv7-20020a17090760c700b0073114e2af10mr3768616ejc.92.1662590443108; Wed, 07 Sep 2022 15:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662590443; cv=none; d=google.com; s=arc-20160816; b=LVkd2OqAr6ogch+v6pEcGFDpuLarEqcvvv+Io3wb9uRsRyNMjOMKnJI6Q5VgWI6y+z +hOEbbzyIoUYJ5Oz6kZtDBoycjQNZieIGWYEzt2qYdFGgBn7nQ72GNxapIwUaOpsBB/B m/8MOLxS3cTyBqy2ZaIXZUdj7MfRAIjlWI/fU81f0xPknx+E4/Rq0pT0pL5q0/1R04d4 NAprrFRsXk8tvnNTz9bPx007hrnbX5bMYBAXd5jsfCPqdFZC8tcv02y7xV3c6Eknspoi HgLpquPilYcfggsCShBmkD0u3qspoPp/5YmAUDSHiJLAps9HXgMBJP0D+v9FaDEzjGHd VQMQ== 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=xxccrhtQ8VLl1Uz6/9cXEUKd6L0B+s2eKNfT1SiDnGw=; b=lZ0QspPjnYHX131j2nOVy17XDZuCIQtw21IN7JkKcgypBni/lMPOddCceA5OGDZ3ka lWfCavW3QMAwYTgkU3Hl2UAb5OVykeCdcDpjhV/E1+3zHw9BRRJeZdt7gPyeKA394xf1 GwiDWHEzKoifl+8d7DLxM4NhWHVPUxP79/3398Whx0HqdVXk/ItJaFtLz55DaLwXaZqc 6wNu4L2CsquInYxtaxSafzjxe0Tt11FGCbPvl78fZmw2Xi97U5/kI3gsiBtASH88NxEN RNzE20dLociXBfp8itmga6kRVyYarFR6GqHPQVvKCobdQ7hCgAcOxxM9ZIqtRHy4lXVf OI3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gEgd1lcm; 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 sg33-20020a170907a42100b0073d594889fasi623175ejc.314.2022.09.07.15.40.17; Wed, 07 Sep 2022 15:40:43 -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=gEgd1lcm; 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 S230427AbiIGVwO (ORCPT + 99 others); Wed, 7 Sep 2022 17:52:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230355AbiIGVv7 (ORCPT ); Wed, 7 Sep 2022 17:51:59 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65794A570D for ; Wed, 7 Sep 2022 14:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662587518; x=1694123518; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pEoUxaPZPLMjLBNBNF4OvAHFC7g2/SirS5M+Zhli82s=; b=gEgd1lcmullD71fW/cwzv32DrE4oYvaKhTGGH6WBpZ/UCtUyZdwL5BJi acdenRunU705okAYkH3DG8Mm7KRAlv+e6y97EhlEdLtms2869zHNV0lgn nEs6/7s2QyLJWGPzUf9qFnVZeJrkcYQ4vulzOVdJwBqx6y8Kqfhdt+brO PusxKHhhSSjdOnrnye633U138J7H6iJ2Bi4T8AYcHtbzJcBzi3HjMsfjx vjStoNXxsPXOqZ1Fc68KC6P/RsUnBloYqM4aNHq885Cc05NG1+Efs5qVk Jzvmaxkwsqg1RgaBMss9yDwAXW2dArQcgbBu35cB2Fn9oGDtkfAv1sphK g==; X-IronPort-AV: E=McAfee;i="6500,9779,10463"; a="295740316" X-IronPort-AV: E=Sophos;i="5.93,298,1654585200"; d="scan'208";a="295740316" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2022 14:51:58 -0700 X-IronPort-AV: E=Sophos;i="5.93,298,1654585200"; d="scan'208";a="790207921" Received: from twinkler-lnx.jer.intel.com ([10.12.87.143]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2022 14:51:54 -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 , Daniele Ceraolo Spurio Subject: [PATCH v9 07/16] mei: gsc: wait for reset thread on stop Date: Thu, 8 Sep 2022 00:51:04 +0300 Message-Id: <20220907215113.1596567-8-tomas.winkler@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220907215113.1596567-1-tomas.winkler@intel.com> References: <20220907215113.1596567-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, 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 Reviewed-by: Daniele Ceraolo Spurio --- V9: Rebase 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