Lines Matching refs:req_ctx

1776 	struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq);  in common_nonsnoop_hash_unmap()  local
1784 if (edesc->last && req_ctx->last_request) in common_nonsnoop_hash_unmap()
1785 memcpy(areq->result, req_ctx->hw_context, in common_nonsnoop_hash_unmap()
1821 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_done() local
1828 if (!req_ctx->last_request && req_ctx->to_hash_later) { in ahash_done()
1830 req_ctx->buf_idx = (req_ctx->buf_idx + 1) & 1; in ahash_done()
1831 req_ctx->nbuf = req_ctx->to_hash_later; in ahash_done()
1853 if (!req_ctx->last_request && req_ctx->to_hash_later) { in ahash_done()
1855 req_ctx->buf_idx = (req_ctx->buf_idx + 1) & 1; in ahash_done()
1856 req_ctx->nbuf = req_ctx->to_hash_later; in ahash_done()
1891 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in common_nonsnoop_hash() local
1902 if (!edesc->first || !req_ctx->first_request || req_ctx->swinit) { in common_nonsnoop_hash()
1904 req_ctx->hw_context_size, in common_nonsnoop_hash()
1905 req_ctx->hw_context, in common_nonsnoop_hash()
1907 req_ctx->swinit = 0; in common_nonsnoop_hash()
1910 req_ctx->first_request = 0; in common_nonsnoop_hash()
1934 if (edesc->last && req_ctx->last_request) in common_nonsnoop_hash()
1937 req_ctx->hw_context, DMA_FROM_DEVICE); in common_nonsnoop_hash()
1940 req_ctx->hw_context_size, in common_nonsnoop_hash()
1941 req_ctx->hw_context, in common_nonsnoop_hash()
1970 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_process_req_prepare() local
1980 src = scatterwalk_ffwd(tmp, req_ctx->psrc, offset); in ahash_process_req_prepare()
1994 scatterwalk_ffwd(edesc->bufsl, req_ctx->psrc, offset); in ahash_process_req_prepare()
2000 if (req_ctx->last_request && edesc->last) in ahash_process_req_prepare()
2006 if (req_ctx->first_request && edesc->first && !req_ctx->swinit) in ahash_process_req_prepare()
2013 if (ctx->keylen && ((req_ctx->first_request && edesc->first) || in ahash_process_req_prepare()
2014 (req_ctx->last_request && edesc->last))) in ahash_process_req_prepare()
2040 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_process_req() local
2050 u8 *ctx_buf = req_ctx->buf[req_ctx->buf_idx]; in ahash_process_req()
2053 if (!req_ctx->last_request && (nbytes + req_ctx->nbuf <= blocksize)) { in ahash_process_req()
2061 ctx_buf + req_ctx->nbuf, nbytes); in ahash_process_req()
2062 req_ctx->nbuf += nbytes; in ahash_process_req()
2067 nbytes_to_hash = nbytes + req_ctx->nbuf; in ahash_process_req()
2070 if (req_ctx->last_request) in ahash_process_req()
2082 if (req_ctx->nbuf) { in ahash_process_req()
2083 nsg = (req_ctx->nbuf < nbytes_to_hash) ? 2 : 1; in ahash_process_req()
2084 sg_init_table(req_ctx->bufsl, nsg); in ahash_process_req()
2085 sg_set_buf(req_ctx->bufsl, ctx_buf, req_ctx->nbuf); in ahash_process_req()
2087 sg_chain(req_ctx->bufsl, 2, areq->src); in ahash_process_req()
2088 req_ctx->psrc = req_ctx->bufsl; in ahash_process_req()
2090 req_ctx->psrc = areq->src; in ahash_process_req()
2099 req_ctx->buf[(req_ctx->buf_idx + 1) & 1], in ahash_process_req()
2103 req_ctx->to_hash_later = to_hash_later; in ahash_process_req()
2122 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_init() local
2127 req_ctx->buf_idx = 0; in ahash_init()
2128 req_ctx->nbuf = 0; in ahash_init()
2129 req_ctx->first_request = 1; in ahash_init()
2130 req_ctx->swinit = 0; /* assume h/w init of context */ in ahash_init()
2134 req_ctx->hw_context_size = size; in ahash_init()
2135 req_ctx->last_request = 0; in ahash_init()
2137 dma = dma_map_single(dev, req_ctx->hw_context, req_ctx->hw_context_size, in ahash_init()
2139 dma_unmap_single(dev, dma, req_ctx->hw_context_size, DMA_TO_DEVICE); in ahash_init()
2150 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_init_sha224_swinit() local
2152 req_ctx->hw_context[0] = SHA224_H0; in ahash_init_sha224_swinit()
2153 req_ctx->hw_context[1] = SHA224_H1; in ahash_init_sha224_swinit()
2154 req_ctx->hw_context[2] = SHA224_H2; in ahash_init_sha224_swinit()
2155 req_ctx->hw_context[3] = SHA224_H3; in ahash_init_sha224_swinit()
2156 req_ctx->hw_context[4] = SHA224_H4; in ahash_init_sha224_swinit()
2157 req_ctx->hw_context[5] = SHA224_H5; in ahash_init_sha224_swinit()
2158 req_ctx->hw_context[6] = SHA224_H6; in ahash_init_sha224_swinit()
2159 req_ctx->hw_context[7] = SHA224_H7; in ahash_init_sha224_swinit()
2162 req_ctx->hw_context[8] = 0; in ahash_init_sha224_swinit()
2163 req_ctx->hw_context[9] = 0; in ahash_init_sha224_swinit()
2166 req_ctx->swinit = 1;/* prevent h/w initting context with sha256 values*/ in ahash_init_sha224_swinit()
2173 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_update() local
2175 req_ctx->last_request = 0; in ahash_update()
2182 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_final() local
2184 req_ctx->last_request = 1; in ahash_final()
2191 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_finup() local
2193 req_ctx->last_request = 1; in ahash_finup()
2212 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_export() local
2219 dma = dma_map_single(dev, req_ctx->hw_context, req_ctx->hw_context_size, in ahash_export()
2221 dma_unmap_single(dev, dma, req_ctx->hw_context_size, DMA_FROM_DEVICE); in ahash_export()
2223 memcpy(export->hw_context, req_ctx->hw_context, in ahash_export()
2224 req_ctx->hw_context_size); in ahash_export()
2225 memcpy(export->buf, req_ctx->buf[req_ctx->buf_idx], req_ctx->nbuf); in ahash_export()
2226 export->swinit = req_ctx->swinit; in ahash_export()
2227 export->first_request = req_ctx->first_request; in ahash_export()
2228 export->last_request = req_ctx->last_request; in ahash_export()
2229 export->to_hash_later = req_ctx->to_hash_later; in ahash_export()
2230 export->nbuf = req_ctx->nbuf; in ahash_export()
2237 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_import() local
2245 memset(req_ctx, 0, sizeof(*req_ctx)); in ahash_import()
2249 req_ctx->hw_context_size = size; in ahash_import()
2250 memcpy(req_ctx->hw_context, export->hw_context, size); in ahash_import()
2251 memcpy(req_ctx->buf[0], export->buf, export->nbuf); in ahash_import()
2252 req_ctx->swinit = export->swinit; in ahash_import()
2253 req_ctx->first_request = export->first_request; in ahash_import()
2254 req_ctx->last_request = export->last_request; in ahash_import()
2255 req_ctx->to_hash_later = export->to_hash_later; in ahash_import()
2256 req_ctx->nbuf = export->nbuf; in ahash_import()
2258 dma = dma_map_single(dev, req_ctx->hw_context, req_ctx->hw_context_size, in ahash_import()
2260 dma_unmap_single(dev, dma, req_ctx->hw_context_size, DMA_TO_DEVICE); in ahash_import()