From patchwork Sat Aug 6 12:26:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Winkler, Tomas" X-Patchwork-Id: 12938028 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E28E8C19F2D for ; Sat, 6 Aug 2022 12:34:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 63E7ABF46A; Sat, 6 Aug 2022 12:32:30 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 72382C1248 for ; Sat, 6 Aug 2022 12:27:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659788858; x=1691324858; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9fhxoekGWO0KDWYJIq6HmBBONVvsUbaOsLI2mG9rBaQ=; b=Rjt/jNGcv7xO5izb7f53GV5xW9qbgT3uQwDLM80XivNbY8VCkSkcY0Dx viRlK/SIPb96ByW0xIjogYdXdMWFKFYVKKPJ1S4jPjNFHlXko7CuOP2ja g7v1obQhzyJgsFFdTPCzQO6l8lhnx8pHT3KYJ2NX9d5NfC/kAjYE0mbiQ fGe531R1tvW4kUnKWni/6qAIUQ0hNRicIqPaMHiwA/x0qiMdDr6yAx/MA ZxM8JPEqNgvPB7VZh+06o1Xr9vTAMK9JKRvbTwU663xFSMUMKx40sQYDq 82L5ROOmYToSxxY0ikAIIN3ZLiQznAma7BE6WQ3/btJ9AfA5EsRSzlBZM Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10430"; a="376658390" X-IronPort-AV: E=Sophos;i="5.93,217,1654585200"; d="scan'208";a="376658390" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Aug 2022 05:27:37 -0700 X-IronPort-AV: E=Sophos;i="5.93,217,1654585200"; d="scan'208";a="632329085" Received: from twinkler-lnx.jer.intel.com ([10.12.87.143]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Aug 2022 05:27:34 -0700 From: Tomas Winkler To: Greg Kroah-Hartman , David Airlie , Daniel Vetter Date: Sat, 6 Aug 2022 15:26:28 +0300 Message-Id: <20220806122636.43068-8-tomas.winkler@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220806122636.43068-1-tomas.winkler@intel.com> References: <20220806122636.43068-1-tomas.winkler@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v7 07/15] mei: gsc: wait for reset thread on stop X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, Alexander Usyskin , linux-kernel@vger.kernel.org, Rodrigo Vivi , Tomas Winkler , Vitaly Lubart Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 --- 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);