Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp179564pxb; Thu, 12 Aug 2021 13:45:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYAlirUuL66ZbdP65ynGYAY7jMsP0M9HPOxE9g35MTq8fQZOGIvWt0vgzDMlVka/h45pa3 X-Received: by 2002:a17:907:6297:: with SMTP id nd23mr5316790ejc.62.1628801113515; Thu, 12 Aug 2021 13:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628801113; cv=none; d=google.com; s=arc-20160816; b=ov1LaJOJVPnZzy/zF/ocwVc4WKil7iox0O22VI8SKa8meTOn24zp99TraIPzCvCIsP cl/cUlzSFI4HrlNR7qTzTSyeKmXN9A2VeawGJMCErG/lp1zHG2O4+GYcjpy8VN32YKv1 yC4Vm/mEcr924x3o2dmUKgufOQtlDMMXn+QWMHf957HJXHrHEidSZsTyJRm6DuFPlDhy MCuOFQd7KrWuoWTN9/HyRofHwF9gTca9RywgOQfPV9/SR/H6zzkpgzND0vRC4J5XrKhV HhbaE0p/zh+1qECzUO7Qg8tM2ri53h1JEoetuN347+o674RwJAKs3DeOeet1uA6C1ra3 nFOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=xxFoQLR6iS644AfbZtbNRD5kOEuvcUpJgjzRNlQNapo=; b=eDrvRTuAkLPemmebkzebyBPkpG6c9iK+O1i9VHvGsNJze5WMsQxQ63q+Cf0vsttfIK b80qLC2I3ViBnz0/MEeAYOi99R/hWb47C4QNLh7yS7m9cLMTGxfdQYD69VFOfWLig+K+ npcCrafK6zdJUEO+fWibuefAlCJOOL/3DW23gDBmKZQL7nxjgq7FO8uY5IeaGNx9+4RB yr9jGp8/Tl1XnpjioVdWZNnftltBUywdqllAGIYTBHUHryQR55T802MkqK+/JrsyoSUh CBp13frfaK/9sMmnvHStE0s+UimzUJ0mZrfOzr0PMudg4xI9kph01ChA9A47x4zMtzEq 3BIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p31si4708138edb.554.2021.08.12.13.44.49; Thu, 12 Aug 2021 13:45:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237135AbhHLUWf (ORCPT + 99 others); Thu, 12 Aug 2021 16:22:35 -0400 Received: from mga03.intel.com ([134.134.136.65]:4163 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237254AbhHLUWb (ORCPT ); Thu, 12 Aug 2021 16:22:31 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10074"; a="215474058" X-IronPort-AV: E=Sophos;i="5.84,316,1620716400"; d="scan'208";a="215474058" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2021 13:22:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,316,1620716400"; d="scan'208";a="517608705" Received: from silpixa00400314.ir.intel.com (HELO silpixa00400314.ger.corp.intel.com) ([10.237.222.51]) by FMSMGA003.fm.intel.com with ESMTP; 12 Aug 2021 13:22:04 -0700 From: Giovanni Cabiddu To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Marco Chiappero , Giovanni Cabiddu , Fiona Trahe Subject: [PATCH 15/20] crypto: qat - complete all the init steps before service notification Date: Thu, 12 Aug 2021 21:21:24 +0100 Message-Id: <20210812202129.18831-16-giovanni.cabiddu@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210812202129.18831-1-giovanni.cabiddu@intel.com> References: <20210812202129.18831-1-giovanni.cabiddu@intel.com> MIME-Version: 1.0 Organization: Intel Research and Development Ireland Ltd - Co. Reg. #308263 - Collinstown Industrial Park, Leixlip, County Kildare - Ireland Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Marco Chiappero Make sure all the steps in the initialization sequence are complete before any completion event notification. Signed-off-by: Marco Chiappero Co-developed-by: Giovanni Cabiddu Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe --- drivers/crypto/qat/qat_common/adf_init.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_init.c b/drivers/crypto/qat/qat_common/adf_init.c index 346dcb8bcca5..52ce1fde9e93 100644 --- a/drivers/crypto/qat/qat_common/adf_init.c +++ b/drivers/crypto/qat/qat_common/adf_init.c @@ -110,6 +110,11 @@ int adf_dev_init(struct adf_accel_dev *accel_dev) set_bit(ADF_STATUS_IRQ_ALLOCATED, &accel_dev->status); hw_data->enable_ints(accel_dev); + hw_data->enable_error_correction(accel_dev); + + ret = hw_data->enable_vf2pf_comms(accel_dev); + if (ret) + return ret; /* * Subservice initialisation is divided into two stages: init and start. @@ -127,10 +132,7 @@ int adf_dev_init(struct adf_accel_dev *accel_dev) set_bit(accel_dev->accel_id, service->init_status); } - hw_data->enable_error_correction(accel_dev); - ret = hw_data->enable_vf2pf_comms(accel_dev); - - return ret; + return 0; } EXPORT_SYMBOL_GPL(adf_dev_init); -- 2.31.1