Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752549AbcLHJFl (ORCPT ); Thu, 8 Dec 2016 04:05:41 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:42552 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752253AbcLHJFi (ORCPT ); Thu, 8 Dec 2016 04:05:38 -0500 Message-ID: <1481187926.14860.19.camel@mtkswgap22> Subject: Re: [PATCH v1 1/2] Add crypto driver support for some MediaTek chips From: Ryder Lee To: Corentin Labbe CC: Herbert Xu , "David S. Miller" , Matthias Brugger , , , , , , Sean Wang , Roy Luo Date: Thu, 8 Dec 2016 17:05:26 +0800 In-Reply-To: <20161205085220.GA333@Red> References: <1480921284-45827-1-git-send-email-ryder.lee@mediatek.com> <1480921284-45827-2-git-send-email-ryder.lee@mediatek.com> <20161205085220.GA333@Red> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1378 Lines: 53 Hello, On Mon, 2016-12-05 at 09:52 +0100, Corentin Labbe wrote: > Hello > > I have two minor comment. > > On Mon, Dec 05, 2016 at 03:01:23PM +0800, Ryder Lee wrote: > > This adds support for the MediaTek hardware accelerator on > > mt7623/mt2701/mt8521p SoC. > > > > This driver currently implement: > > - SHA1 and SHA2 family(HMAC) hash alogrithms. > > There is a typo for algorithms. > > [...] > > +/** > > + * struct mtk_desc - DMA descriptor > > + * @hdr: the descriptor control header > > + * @buf: DMA address of input buffer segment > > + * @ct: DMA address of command token that control operation flow > > + * @ct_hdr: the command token control header > > + * @tag: the user-defined field > > + * @tfm: DMA address of transform state > > + * @bound: align descriptors offset boundary > > + * > > + * Structure passed to the crypto engine to describe where source > > + * data needs to be fetched and how it needs to be processed. > > + */ > > +struct mtk_desc { > > + u32 hdr; > > + u32 buf; > > + u32 ct; > > + u32 ct_hdr; > > + u32 tag; > > + u32 tfm; > > + u32 bound[2]; > > +}; > > Do you have tested this descriptor with BE/LE kernel ? I did not test it with BE kernel, because both CPU and accelerator in our SoC just run on LE system. Thanks for reminding me, i will use byteorder conversion macros and type identifiers. > Regards > Corentin Labbe