Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1304143pxb; Fri, 24 Sep 2021 01:12:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhpj3dUF5zANFqRmo6wfdi9r7HuRJQwRFpoAWw2fZR0q9VIubqy1XQGa9YORNF361bz4mQ X-Received: by 2002:a50:e141:: with SMTP id i1mr3553089edl.157.1632471178475; Fri, 24 Sep 2021 01:12:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632471178; cv=none; d=google.com; s=arc-20160816; b=u3GuisZMUoeMxZq9FBcG73MIXBpW5ckVK34D5DPW0sA/7eQCKLSiwoKiQPdgTGoF+K IemZ0tPyUS0YmvkgaDpKqsgn9ir0eKmTVcoa4RsqPbhMDjBfRlYBjQLwzLcOWWSpBvyA P8P7VtZQFLQ7rkvbxnj1QnulmpSMwcIDr20fHs3TsOOy3Fbrd5fo8KxVLdfWAP2+9H7L yTvk68Ywe0FCnUftL7KaVdRLBsmcmtLiqVqe3dY6vAWyK8qraC9cFS2pvwtqKEw/afwJ zeLwSKA/FCD6GUoPakDeSat0DvTNptmEdOhebBKYsZaLvzwW94hQ6YPdEh1XTxvAj/ET 6c9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=SLR09JZhXlTZw4JaUChYieBP7lxuo1R6URyLhSTONaU=; b=rnVX/zbEVd7h8lJ0RZT7SeAMC1imLJ6P0HOipvqLp9+pAwzlsYhPwAuPoXTXuFtB0z m/OZ2pRmGVlx3aPgz5q5d1mXW0fJe/Yw1zOTf0ipDY1Vk1L5IClFcPrkD4sRuk2Fo1hA H05vEV8R9LEjMIFw3zjKe9y0SDCKgpZU1dOspVtCg2dh9dQjMPrUFm2Ji+cxVQCoJ3qr G8XqqeqTfUfDZMMp7PxEZHnhSwgh5/AaAd7JyuwcEgceAutJ8POwsarufMWIs0Ys2ndv 2R4AgZ9EiLOmiDEc/K9jxUB4NVn69BJqbAA5Ido5IvzdT4ny15Ny+9DuH2YY06EcDO4K yzMQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o30si8681218edi.149.2021.09.24.01.12.34; Fri, 24 Sep 2021 01:12:58 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244529AbhIXIKq (ORCPT + 99 others); Fri, 24 Sep 2021 04:10:46 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:55468 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235272AbhIXIKp (ORCPT ); Fri, 24 Sep 2021 04:10:45 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.92 #5 (Debian)) id 1mTgGe-00087D-CS; Fri, 24 Sep 2021 16:09:12 +0800 Received: from herbert by gondobar with local (Exim 4.92) (envelope-from ) id 1mTgGe-0003So-7c; Fri, 24 Sep 2021 16:09:12 +0800 Date: Fri, 24 Sep 2021 16:09:12 +0800 From: Herbert Xu To: Giovanni Cabiddu Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Wojciech Ziemba Subject: Re: [PATCH] crypto: qat - power up 4xxx device Message-ID: <20210924080912.GC13213@gondor.apana.org.au> References: <20210916144541.56238-1-giovanni.cabiddu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210916144541.56238-1-giovanni.cabiddu@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Sep 16, 2021 at 03:45:41PM +0100, Giovanni Cabiddu wrote: > After reset or boot, QAT 4xxx devices are inactive and require to be > explicitly activated. > This is done by writing the DRV_ACTIVE bit in the PM_INTERRUPT register > and polling the PM_INIT_STATE to make sure that the transaction has > completed properly. > > If this is not done, the driver will fail the initialization sequence > reporting the following message: > [ 22.081193] 4xxx 0000:f7:00.0: enabling device (0140 -> 0142) > [ 22.720285] QAT: AE0 is inactive!! > [ 22.720287] QAT: failed to get device out of reset > [ 22.720288] 4xxx 0000:f7:00.0: qat_hal_clr_reset error > [ 22.720290] 4xxx 0000:f7:00.0: Failed to init the AEs > [ 22.720290] 4xxx 0000:f7:00.0: Failed to initialise Acceleration Engine > [ 22.720789] 4xxx 0000:f7:00.0: Resetting device qat_dev0 > [ 22.825099] 4xxx: probe of 0000:f7:00.0 failed with error -14 > > The patch also temporarily disables the power management source of > interrupt, to avoid possible spurious interrupts as the power management > feature is not fully supported. > > The device init function has been added to adf_dev_init(), and not in the > probe of 4xxx to make sure that the device is re-enabled in case of > reset. > > Note that the error code reported by hw_data->init_device() in > adf_dev_init() has been shadowed for consistency with the other calls > in the same function. > > Fixes: 8c8268166e83 ("crypto: qat - add qat_4xxx driver") > Signed-off-by: Giovanni Cabiddu > Reviewed-by: Wojciech Ziemba > --- > .../crypto/qat/qat_4xxx/adf_4xxx_hw_data.c | 31 +++++++++++++++++++ > .../crypto/qat/qat_4xxx/adf_4xxx_hw_data.h | 10 ++++++ > .../crypto/qat/qat_common/adf_accel_devices.h | 1 + > drivers/crypto/qat/qat_common/adf_init.c | 5 +++ > 4 files changed, 47 insertions(+) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt