Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: talitos - move struct talitos_edesc into talitos.h

Moves struct talitos_edesc into talitos.h so that it can be used
from any place in talitos.c

It will be required for next patch ("crypto: talitos - fix hash
on SEC1")

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Christophe Leroy and committed by
Herbert Xu
d44769e4 aeb87246

+30 -30
-30
drivers/crypto/talitos.c
··· 951 951 goto out; 952 952 } 953 953 954 - /* 955 - * talitos_edesc - s/w-extended descriptor 956 - * @src_nents: number of segments in input scatterlist 957 - * @dst_nents: number of segments in output scatterlist 958 - * @icv_ool: whether ICV is out-of-line 959 - * @iv_dma: dma address of iv for checking continuity and link table 960 - * @dma_len: length of dma mapped link_tbl space 961 - * @dma_link_tbl: bus physical address of link_tbl/buf 962 - * @desc: h/w descriptor 963 - * @link_tbl: input and output h/w link tables (if {src,dst}_nents > 1) (SEC2) 964 - * @buf: input and output buffeur (if {src,dst}_nents > 1) (SEC1) 965 - * 966 - * if decrypting (with authcheck), or either one of src_nents or dst_nents 967 - * is greater than 1, an integrity check value is concatenated to the end 968 - * of link_tbl data 969 - */ 970 - struct talitos_edesc { 971 - int src_nents; 972 - int dst_nents; 973 - bool icv_ool; 974 - dma_addr_t iv_dma; 975 - int dma_len; 976 - dma_addr_t dma_link_tbl; 977 - struct talitos_desc desc; 978 - union { 979 - struct talitos_ptr link_tbl[0]; 980 - u8 buf[0]; 981 - }; 982 - }; 983 - 984 954 static void talitos_sg_unmap(struct device *dev, 985 955 struct talitos_edesc *edesc, 986 956 struct scatterlist *src,
+30
drivers/crypto/talitos.h
··· 42 42 43 43 #define TALITOS_DESC_SIZE (sizeof(struct talitos_desc) - sizeof(__be32)) 44 44 45 + /* 46 + * talitos_edesc - s/w-extended descriptor 47 + * @src_nents: number of segments in input scatterlist 48 + * @dst_nents: number of segments in output scatterlist 49 + * @icv_ool: whether ICV is out-of-line 50 + * @iv_dma: dma address of iv for checking continuity and link table 51 + * @dma_len: length of dma mapped link_tbl space 52 + * @dma_link_tbl: bus physical address of link_tbl/buf 53 + * @desc: h/w descriptor 54 + * @link_tbl: input and output h/w link tables (if {src,dst}_nents > 1) (SEC2) 55 + * @buf: input and output buffeur (if {src,dst}_nents > 1) (SEC1) 56 + * 57 + * if decrypting (with authcheck), or either one of src_nents or dst_nents 58 + * is greater than 1, an integrity check value is concatenated to the end 59 + * of link_tbl data 60 + */ 61 + struct talitos_edesc { 62 + int src_nents; 63 + int dst_nents; 64 + bool icv_ool; 65 + dma_addr_t iv_dma; 66 + int dma_len; 67 + dma_addr_t dma_link_tbl; 68 + struct talitos_desc desc; 69 + union { 70 + struct talitos_ptr link_tbl[0]; 71 + u8 buf[0]; 72 + }; 73 + }; 74 + 45 75 /** 46 76 * talitos_request - descriptor submission request 47 77 * @desc: descriptor pointer (kernel virtual)