From patchwork Wed Dec 23 15:36:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tadeusz Struk X-Patchwork-Id: 7913091 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 87A579F349 for ; Wed, 23 Dec 2015 15:40:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B7EAE20431 for ; Wed, 23 Dec 2015 15:39:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BBFEB202C8 for ; Wed, 23 Dec 2015 15:39:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755284AbbLWPj5 (ORCPT ); Wed, 23 Dec 2015 10:39:57 -0500 Received: from mga11.intel.com ([192.55.52.93]:39691 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752977AbbLWPj5 (ORCPT ); Wed, 23 Dec 2015 10:39:57 -0500 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 23 Dec 2015 07:39:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,469,1444719600"; d="scan'208";a="622813173" Received: from skomath-mobl1.amr.corp.intel.com (HELO [127.0.1.1]) ([10.254.111.224]) by FMSMGA003.fm.intel.com with ESMTP; 23 Dec 2015 07:39:57 -0800 Subject: [PATCH] crypto: qat - fix SKU definiftion for c3xxx dev From: Tadeusz Struk To: herbert@gondor.apana.org.au Cc: linux-crypto@vger.kernel.org, tadeusz.struk@intel.com Date: Wed, 23 Dec 2015 07:36:28 -0800 Message-ID: <20151223153628.8771.71889.stgit@tstruk-mobl1> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP c3xxx doesn't have the esram BAR and only has 6 ue. Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.c | 22 ++++++---------------- drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.h | 5 ++--- 2 files changed, 8 insertions(+), 19 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.c b/drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.c index bda8f9f..c5bd5a9 100644 --- a/drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.c +++ b/drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.c @@ -50,14 +50,9 @@ #include "adf_c3xxx_hw_data.h" /* Worker thread to service arbiter mappings based on dev SKUs */ -static const u32 thrd_to_arb_map_8_me_sku[] = { - 0x10000888, 0x11000888, 0x10000888, 0x11000888, 0x10000888, - 0x11000888, 0x10000888, 0x11000888, 0, 0 -}; - -static const u32 thrd_to_arb_map_10_me_sku[] = { - 0x12222AAA, 0x11222AAA, 0x12222AAA, 0x11222AAA, 0x12222AAA, - 0x11222AAA, 0x12222AAA, 0x11222AAA, 0x12222AAA, 0x11222AAA +static const u32 thrd_to_arb_map_6_me_sku[] = { + 0x12222AAA, 0x11222AAA, 0x12222AAA, + 0x11222AAA, 0x12222AAA, 0x11222AAA }; static struct adf_hw_device_class c3xxx_class = { @@ -117,16 +112,14 @@ static u32 get_etr_bar_id(struct adf_hw_device_data *self) static u32 get_sram_bar_id(struct adf_hw_device_data *self) { - return ADF_C3XXX_SRAM_BAR; + return 0; } static enum dev_sku_info get_sku(struct adf_hw_device_data *self) { int aes = get_num_aes(self); - if (aes == 8) - return DEV_SKU_2; - else if (aes == 10) + if (aes == 6) return DEV_SKU_4; return DEV_SKU_UNKNOWN; @@ -136,11 +129,8 @@ static void adf_get_arbiter_mapping(struct adf_accel_dev *accel_dev, u32 const **arb_map_config) { switch (accel_dev->accel_pci_dev.sku) { - case DEV_SKU_2: - *arb_map_config = thrd_to_arb_map_8_me_sku; - break; case DEV_SKU_4: - *arb_map_config = thrd_to_arb_map_10_me_sku; + *arb_map_config = thrd_to_arb_map_6_me_sku; break; default: dev_err(&GET_DEV(accel_dev), diff --git a/drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.h b/drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.h index f2fa234..2f2681d 100644 --- a/drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.h +++ b/drivers/crypto/qat/qat_c3xxx/adf_c3xxx_hw_data.h @@ -48,9 +48,8 @@ #define ADF_C3XXX_HW_DATA_H_ /* PCIe configuration space */ -#define ADF_C3XXX_SRAM_BAR 0 -#define ADF_C3XXX_PMISC_BAR 1 -#define ADF_C3XXX_ETR_BAR 2 +#define ADF_C3XXX_PMISC_BAR 0 +#define ADF_C3XXX_ETR_BAR 1 #define ADF_C3XXX_RX_RINGS_OFFSET 8 #define ADF_C3XXX_TX_RINGS_MASK 0xFF #define ADF_C3XXX_MAX_ACCELERATORS 3