Lines Matching refs:req_ctx
1655 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in common_nonsnoop_hash_unmap() local
1661 unmap_sg_talitos_ptr(dev, req_ctx->psrc, NULL, 0, edesc); in common_nonsnoop_hash_unmap()
1685 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_done() local
1687 if (!req_ctx->last && req_ctx->to_hash_later) { in ahash_done()
1689 memcpy(req_ctx->buf, req_ctx->bufnext, req_ctx->to_hash_later); in ahash_done()
1690 req_ctx->nbuf = req_ctx->to_hash_later; in ahash_done()
1728 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in common_nonsnoop_hash() local
1739 if (!req_ctx->first || req_ctx->swinit) { in common_nonsnoop_hash()
1741 req_ctx->hw_context_size, in common_nonsnoop_hash()
1742 (char *)req_ctx->hw_context, in common_nonsnoop_hash()
1744 req_ctx->swinit = 0; in common_nonsnoop_hash()
1748 req_ctx->first = 0; in common_nonsnoop_hash()
1761 map_sg_in_talitos_ptr(dev, req_ctx->psrc, length, edesc, in common_nonsnoop_hash()
1768 if (req_ctx->last) in common_nonsnoop_hash()
1774 req_ctx->hw_context_size, in common_nonsnoop_hash()
1775 req_ctx->hw_context, DMA_FROM_DEVICE); in common_nonsnoop_hash()
1796 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_edesc_alloc() local
1798 return talitos_edesc_alloc(ctx->dev, req_ctx->psrc, NULL, NULL, 0, in ahash_edesc_alloc()
1805 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_init() local
1808 req_ctx->nbuf = 0; in ahash_init()
1809 req_ctx->first = 1; /* first indicates h/w must init its context */ in ahash_init()
1810 req_ctx->swinit = 0; /* assume h/w init of context */ in ahash_init()
1811 req_ctx->hw_context_size = in ahash_init()
1825 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_init_sha224_swinit() local
1828 req_ctx->swinit = 1;/* prevent h/w initting context with sha256 values*/ in ahash_init_sha224_swinit()
1830 req_ctx->hw_context[0] = SHA224_H0; in ahash_init_sha224_swinit()
1831 req_ctx->hw_context[1] = SHA224_H1; in ahash_init_sha224_swinit()
1832 req_ctx->hw_context[2] = SHA224_H2; in ahash_init_sha224_swinit()
1833 req_ctx->hw_context[3] = SHA224_H3; in ahash_init_sha224_swinit()
1834 req_ctx->hw_context[4] = SHA224_H4; in ahash_init_sha224_swinit()
1835 req_ctx->hw_context[5] = SHA224_H5; in ahash_init_sha224_swinit()
1836 req_ctx->hw_context[6] = SHA224_H6; in ahash_init_sha224_swinit()
1837 req_ctx->hw_context[7] = SHA224_H7; in ahash_init_sha224_swinit()
1840 req_ctx->hw_context[8] = 0; in ahash_init_sha224_swinit()
1841 req_ctx->hw_context[9] = 0; in ahash_init_sha224_swinit()
1850 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_process_req() local
1858 if (!req_ctx->last && (nbytes + req_ctx->nbuf <= blocksize)) { in ahash_process_req()
1862 req_ctx->buf + req_ctx->nbuf, nbytes); in ahash_process_req()
1863 req_ctx->nbuf += nbytes; in ahash_process_req()
1868 nbytes_to_hash = nbytes + req_ctx->nbuf; in ahash_process_req()
1871 if (req_ctx->last) in ahash_process_req()
1883 if (req_ctx->nbuf) { in ahash_process_req()
1884 nsg = (req_ctx->nbuf < nbytes_to_hash) ? 2 : 1; in ahash_process_req()
1885 sg_init_table(req_ctx->bufsl, nsg); in ahash_process_req()
1886 sg_set_buf(req_ctx->bufsl, req_ctx->buf, req_ctx->nbuf); in ahash_process_req()
1888 sg_chain(req_ctx->bufsl, 2, areq->src); in ahash_process_req()
1889 req_ctx->psrc = req_ctx->bufsl; in ahash_process_req()
1891 req_ctx->psrc = areq->src; in ahash_process_req()
1896 req_ctx->bufnext, in ahash_process_req()
1900 req_ctx->to_hash_later = to_hash_later; in ahash_process_req()
1910 if (req_ctx->last) in ahash_process_req()
1916 if (req_ctx->first && !req_ctx->swinit) in ahash_process_req()
1922 if (ctx->keylen && (req_ctx->first || req_ctx->last)) in ahash_process_req()
1931 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_update() local
1933 req_ctx->last = 0; in ahash_update()
1940 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_final() local
1942 req_ctx->last = 1; in ahash_final()
1949 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_finup() local
1951 req_ctx->last = 1; in ahash_finup()
1958 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_digest() local
1962 req_ctx->last = 1; in ahash_digest()
1969 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_export() local
1972 memcpy(export->hw_context, req_ctx->hw_context, in ahash_export()
1973 req_ctx->hw_context_size); in ahash_export()
1974 memcpy(export->buf, req_ctx->buf, req_ctx->nbuf); in ahash_export()
1975 export->swinit = req_ctx->swinit; in ahash_export()
1976 export->first = req_ctx->first; in ahash_export()
1977 export->last = req_ctx->last; in ahash_export()
1978 export->to_hash_later = req_ctx->to_hash_later; in ahash_export()
1979 export->nbuf = req_ctx->nbuf; in ahash_export()
1986 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_import() local
1990 memset(req_ctx, 0, sizeof(*req_ctx)); in ahash_import()
1991 req_ctx->hw_context_size = in ahash_import()
1995 memcpy(req_ctx->hw_context, export->hw_context, in ahash_import()
1996 req_ctx->hw_context_size); in ahash_import()
1997 memcpy(req_ctx->buf, export->buf, export->nbuf); in ahash_import()
1998 req_ctx->swinit = export->swinit; in ahash_import()
1999 req_ctx->first = export->first; in ahash_import()
2000 req_ctx->last = export->last; in ahash_import()
2001 req_ctx->to_hash_later = export->to_hash_later; in ahash_import()
2002 req_ctx->nbuf = export->nbuf; in ahash_import()