Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp625767rwb; Wed, 16 Nov 2022 05:42:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf7x0Qfxc61TGqaPb6HMaPnuDwkibxHKSXqS4b46Tf5A0QvfRJX7IxagA2dvr7ua6km+8kqL X-Received: by 2002:aa7:db43:0:b0:464:2afe:ae18 with SMTP id n3-20020aa7db43000000b004642afeae18mr19563652edt.183.1668606176308; Wed, 16 Nov 2022 05:42:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668606176; cv=none; d=google.com; s=arc-20160816; b=qjvhs6/Hy35FhFZmXgcpIfxBRCxcEgFU1bqfZ+Uu4VHVyHBsTqgU11MkpRPw+rOeej eUxSQRSuZkAQtQLegxNy3aMWFL+/vYic8oRpWb0yvH9PWYP8X0m9xLRHkNdnBd0cu4oH KGm9zti8qxN/WmeBN7kkXYVuRdNhot1jmtn9bdoJan8fq39wFSQEU/Y8sYReWTuMKYhq LWOxqieZUnKh+sWPis3tsLHN7PKE/bZBNiz67wgEIh1kTLjRcMesoMEKYltTeRDnRuub CovXC9T2QGnuCOc3O6vKMuJS4AQ1mJEhRsAu4U2arppezg+Y8kMNZvnGbemgmhgE8WwM Dmfg== 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=deezvOnR2I9+te+huWgXd4rc5D3NKDDYVebMhqGATMU=; b=W7D+Usn3hKxHBVAqutdSgC/bZ9iC5iE/40wVZK3P7OC1UGwaSdE6sIsqvw9C3TInvX UAT0KYamtVyrcpGQWNIbLVLim8SKA+pMQ+J5+wGj6le5V7DClaiB0V6r2oiLtbcCo/Yi pLPDIvcYntE+9CGYCnnaceaOGoery3zeaYLoQGqtCc/u4BNLWdL03mUkqG2yng5qCKQs 2Wws/xiNfU+dv/83sbvTbDL6dU9jx5i6FSXTd0S9S2tTcWJg2cVpx8RAOvowKB8ODts2 jyfEdc2uzSTtiThsWHTx/BHpqxC3+Tg0r0nLkeJB73XJyCHNtFPgmOXGRCsUESmM8HmN dFCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iwvmxCDc; 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 k3-20020a170906680300b0072ef52514f6si11728737ejr.629.2022.11.16.05.42.32; Wed, 16 Nov 2022 05:42:56 -0800 (PST) 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=iwvmxCDc; 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 S237958AbiKPMsO (ORCPT + 91 others); Wed, 16 Nov 2022 07:48:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238117AbiKPMsJ (ORCPT ); Wed, 16 Nov 2022 07:48:09 -0500 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1F0918B34 for ; Wed, 16 Nov 2022 04:48:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668602887; x=1700138887; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ObjukXOqfUoSlSHWt+gB5nKjWOUIqtAmQ5a7qWIzcAg=; b=iwvmxCDcKYddcIWyAvquDYuHUFxzuAIULEw8BwjPr0CaDb4tPweDZ7Tc GwonQkYtr68tKKvc4nchPSWIQDuzCW92p7FqIY2C0rRCDSgUm9moBpmRm srklPeNz5bwtlbchZz+uztrR/jgT4F4QBMlN8nH6m7xWksdnW5a6tnZqo xAySyBc5jjqphTq0B1aZRAR38cyX+p3tanJXHoM8WLf9uhFTXTX+rObpB phE4uHAEal0FY1+ypxfPX7MZ80k2vMpkTFot1XpmWIa8D45/iHy6igv6F wEMCj0UaMKh1RRo+TgY9NkPPZpWex6acnYUJ1pCPeNiH6U/Lsry5Xr5l/ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10532"; a="292240426" X-IronPort-AV: E=Sophos;i="5.96,167,1665471600"; d="scan'208";a="292240426" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2022 04:48:07 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10532"; a="633618121" X-IronPort-AV: E=Sophos;i="5.96,167,1665471600"; d="scan'208";a="633618121" Received: from sannilnx.jer.intel.com ([10.12.26.175]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2022 04:47:52 -0800 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 v3 2/2] mei: bus-fixup: change pxp mode only if message was sent Date: Wed, 16 Nov 2022 14:47:35 +0200 Message-Id: <20221116124735.2493847-3-alexander.usyskin@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221116124735.2493847-1-alexander.usyskin@intel.com> References: <20221116124735.2493847-1-alexander.usyskin@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_PASS,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 Move PXP mode state machine to SETUP mode only if memory ready message sent successfully to the firmware. Leave it in INIT mode otherwise to allow try to send message later. Signed-off-by: Alexander Usyskin --- drivers/misc/mei/bus-fixup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c index 90023c34666e..6df7679d9739 100644 --- a/drivers/misc/mei/bus-fixup.c +++ b/drivers/misc/mei/bus-fixup.c @@ -266,12 +266,13 @@ static void mei_gsc_mkhi_fix_ver(struct mei_cl_device *cldev) if (cldev->bus->pxp_mode == MEI_DEV_PXP_INIT) { ret = mei_gfx_memory_ready(cldev); - if (ret < 0) + if (ret < 0) { dev_err(&cldev->dev, "memory ready command failed %d\n", ret); - else + } else { dev_dbg(&cldev->dev, "memory ready command sent\n"); + cldev->bus->pxp_mode = MEI_DEV_PXP_SETUP; + } /* we go to reset after that */ - cldev->bus->pxp_mode = MEI_DEV_PXP_SETUP; goto out; } -- 2.34.1