Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp1949117imi; Sun, 24 Jul 2022 01:54:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tCe4Y78L0VvVlYDlf7KiBTlsHJFgDPPtP5uBObf+BR1+6xnQ7ikD8RzY4gNUaT6WKSY7WB X-Received: by 2002:a17:902:d701:b0:16d:4d01:77e8 with SMTP id w1-20020a170902d70100b0016d4d0177e8mr6605460ply.149.1658652854201; Sun, 24 Jul 2022 01:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658652854; cv=none; d=google.com; s=arc-20160816; b=AAGgU4qOl6XmQAQnIAm88HrmJtPeY8iK+3lFGTsIHyLaxyaNRd1TFeb3Q1aMPEfc5x wd2npitWr5WHVrDB1mAJeM0YfSNPUSbJJlI73HirXKlG+LSTTSHj8uNdGgS5gAwJAQUD lmGiQY1Rt+UJqPdvEmGc3HKNVUeOfbzDQitkjc9tf6/R2pDkD6W4kEQqzqPgCy4QbzeR 7TZtZANqwEXMf5bBqiB7mDcbDge+so3H+x+l7hZrC514i1g4/ZcyQqC/HR0HqlfAq/XA x2Jr2f/65RtKlfvzTMUIesd7wqHwvq8zprTVVJu3ydfoIHzcP8ULYQHu1PJlpnW4qahf DZbA== 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=XSydlibsVCCt+lbrOjNwnmy2AXF+Qi3xVCCUKDvyBeU=; b=G9TP/dWfq3yjZkmrD6plvHkgo50I5fgSl+xQGcl0UPRTsY+4oUxBpUQFJ3kOJVCHDD j/klH3J+OTm/lHm/6WrZ4NrDbtOJrRY+HVZ/bGSZlWqRkY0uCSgTqq0/e6hmGX/6NpkZ +lIGrwClMyOor/kUAN5IY60sHZ7dyE8FF6j5MUbrF3DJ9tLQIaQEJovHk29rskYu+dsD ebAExFzKSVaA8f8aovnp4OemovPHWXPs+TC/tQZjWoZn82GpEd6WWbzCJY6FYJtGrrWc Jq9jhqG6Uo0CCJ6wLtvcQZHco/z3wj2yLmmPPdCEAgfIwoiPRaRoq5gdKS5HdEfkj7BA eOZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="LRdR/LPc"; 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 t5-20020a63dd05000000b00415dfbed12bsi10343897pgg.514.2022.07.24.01.53.59; Sun, 24 Jul 2022 01:54:14 -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="LRdR/LPc"; 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 S230309AbiGXIZn (ORCPT + 99 others); Sun, 24 Jul 2022 04:25:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230135AbiGXIZP (ORCPT ); Sun, 24 Jul 2022 04:25:15 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7067DEBD for ; Sun, 24 Jul 2022 01:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658651112; x=1690187112; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UTIXExrBUhARWZJRHWbuEcK7DiIdDp41da9Oe97CF9U=; b=LRdR/LPcomYcEehac2aGFN7WQuSNFhTKyZ1jp1NW9S0w3CjjepemXXH/ X2bPmEhEd4RHESZlttFfQX3nF1tbzE5yKaM+IP6hA7h696tQaftThlujT a6Q4pgykXeGF9julIkQEqfCzme5WxBDD7ekB0k92jvNoFPBo1O5dTgU7n h9cJjLjx1rUVubVjqa+lWuDyTsvO8sBH2Mgm91L3oS+ixpPrxkKQRkrnX 0y0jP37GC1G8KifNxca9kMK7iYY8u4y3tSlWiMPvHu0FXeyObNxaFVb6u K+J2FhRXovqDdSSSqTK685rxZcF+B3bOyCOml5Z04RToJJkV6/6S2/xdz Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10417"; a="288708496" X-IronPort-AV: E=Sophos;i="5.93,190,1654585200"; d="scan'208";a="288708496" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2022 01:25:10 -0700 X-IronPort-AV: E=Sophos;i="5.93,190,1654585200"; d="scan'208";a="657756293" Received: from twinkler-lnx.jer.intel.com ([10.12.87.143]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2022 01:25:06 -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 Subject: [PATCH v6 06/14] mei: gsc: wait for reset thread on stop Date: Sun, 24 Jul 2022 11:24:20 +0300 Message-Id: <20220724082428.218628-7-tomas.winkler@intel.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220724082428.218628-1-tomas.winkler@intel.com> References: <20220724082428.218628-1-tomas.winkler@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 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 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 --- 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.35.3