Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2031084pxf; Sat, 27 Mar 2021 00:33:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy77H7ql0CAbSSX6NMQZ068crmxa9lmWwDNipc5PyebYqATK4YhQwSGU1HWmflx/bDgW7OC X-Received: by 2002:a17:906:3544:: with SMTP id s4mr19428453eja.73.1616830386970; Sat, 27 Mar 2021 00:33:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616830386; cv=none; d=google.com; s=arc-20160816; b=W9hFI7mTaQSDdhl1d/6fzdOX533mmmlw73JJcNzcUg8RnVf+ag3qummptrMbkF4g1o txMyfBns3/0h0HlF5BxX8zCzNZEVAWb6W0zi20fxgXRwI5dRG88o2dZMguUAW66OFAVI LR4gICtc2kZn0rLjNUTxWy0Z3f/kd8yGJEoBWn28L+uj/GYi4MUWImFL0XDL0sk+9lnR LHxDMI/JNAgypGuaO49ZKgOYi8AjhT92D4mhgqxPI9jfRF63hX/Z/+5ueLv+7YX0yp9F WXprxok3NIgO07p2SUBkw2iGK3y3A74FkigylobEBwEcqz2Nr56Tgub2v0xBhAEc2lq/ 5mqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=gYmOzfYtRgzBJLSO4uNNY+J56eNZvPKnhsk3gaR2Gnk=; b=MipWztY7pv0AknPT1uXWmHEGXaCGEvzkiTW1DfaOEe5PHytOyPlAMNS5kY3FHNsRxY bmV90Ws+0LgTKMcdoF/wLEPx4RwpTG9SeEbdaQn+gcKDxgFAvH4Zr1fTlw2qy81g7VhS BvQq6PwrDgjDD+gGo+MoUE4Q/TY65q/SewFNkVg5XbKodskxgEsYBkeGbQptcnfiiVb9 LfpyvnA35N7TGlPppcugGBS1GL8TtwXPgnW11hjGT+K8xZgTyOSVjVpfBijUhKlGxGT1 TZ1EN4ADNJisObrH31OnZi9C/zCWtq4WPsVLcL/s/g78rFbpQD1hGadpouXgQzBXbR7h ZGXQ== 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=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si8251642edq.338.2021.03.27.00.32.30; Sat, 27 Mar 2021 00:33:06 -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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230415AbhC0Hb5 (ORCPT + 99 others); Sat, 27 Mar 2021 03:31:57 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:14159 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbhC0Hba (ORCPT ); Sat, 27 Mar 2021 03:31:30 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F6r785sVMzndkV; Sat, 27 Mar 2021 15:28:52 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.498.0; Sat, 27 Mar 2021 15:31:20 +0800 From: Yang Shen To: , CC: , , Subject: [PATCH v2 2/4] crypto: hisilicon/zip - add comments for 'hisi_zip_sqe' Date: Sat, 27 Mar 2021 15:28:46 +0800 Message-ID: <1616830128-46827-3-git-send-email-shenyang39@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1616830128-46827-1-git-send-email-shenyang39@huawei.com> References: <1616830128-46827-1-git-send-email-shenyang39@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Some fields of 'hisi_zip_sqe' are unused, and some fields have misc utilities. So add comments for used fields and make others unnamed. Signed-off-by: Yang Shen --- drivers/crypto/hisilicon/zip/zip.h | 45 ++++++++++++++++++++++--------- drivers/crypto/hisilicon/zip/zip_crypto.c | 4 +-- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/drivers/crypto/hisilicon/zip/zip.h b/drivers/crypto/hisilicon/zip/zip.h index 9ed7461..b4d3e03 100644 --- a/drivers/crypto/hisilicon/zip/zip.h +++ b/drivers/crypto/hisilicon/zip/zip.h @@ -33,31 +33,50 @@ struct hisi_zip_sqe { u32 consumed; u32 produced; u32 comp_data_length; + /* + * status: 0~7 bits + * rsvd: 8~31 bits + */ u32 dw3; u32 input_data_length; - u32 lba_l; - u32 lba_h; + u32 dw5; + u32 dw6; + /* + * in_sge_data_offset: 0~23 bits + * rsvd: 24~27 bits + * sqe_type: 29~31 bits + */ u32 dw7; + /* + * out_sge_data_offset: 0~23 bits + * rsvd: 24~31 bits + */ u32 dw8; + /* + * request_type: 0~7 bits + * buffer_type: 8~11 bits + * rsvd: 13~31 bits + */ u32 dw9; u32 dw10; - u32 priv_info; + u32 dw11; u32 dw12; - u32 tag; + /* tag: in sqe type 0 */ + u32 dw13; u32 dest_avail_out; - u32 rsvd0; - u32 comp_head_addr_l; - u32 comp_head_addr_h; + u32 dw15; + u32 dw16; + u32 dw17; u32 source_addr_l; u32 source_addr_h; u32 dest_addr_l; u32 dest_addr_h; - u32 stream_ctx_addr_l; - u32 stream_ctx_addr_h; - u32 cipher_key1_addr_l; - u32 cipher_key1_addr_h; - u32 cipher_key2_addr_l; - u32 cipher_key2_addr_h; + u32 dw22; + u32 dw23; + u32 dw24; + u32 dw25; + u32 dw26; + u32 dw27; u32 rsvd1[4]; }; diff --git a/drivers/crypto/hisilicon/zip/zip_crypto.c b/drivers/crypto/hisilicon/zip/zip_crypto.c index 989b273..3bc2148 100644 --- a/drivers/crypto/hisilicon/zip/zip_crypto.c +++ b/drivers/crypto/hisilicon/zip/zip_crypto.c @@ -253,7 +253,7 @@ static void hisi_zip_config_buf_type(struct hisi_zip_sqe *sqe, u8 buf_type) static void hisi_zip_config_tag(struct hisi_zip_sqe *sqe, u32 tag) { - sqe->tag = tag; + sqe->dw13 = tag; } static void hisi_zip_fill_sqe(struct hisi_zip_sqe *sqe, u8 req_type, @@ -339,7 +339,7 @@ static void hisi_zip_acomp_cb(struct hisi_qp *qp, void *data) struct hisi_zip_req_q *req_q = &qp_ctx->req_q; struct device *dev = &qp->qm->pdev->dev; struct hisi_zip_sqe *sqe = data; - struct hisi_zip_req *req = req_q->q + sqe->tag; + struct hisi_zip_req *req = req_q->q + sqe->dw13; struct acomp_req *acomp_req = req->req; u32 status, dlen, head_size; int err = 0; -- 2.8.1