Lines Matching refs:req_ctx

1510 	struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq);  in common_nonsnoop_hash_unmap()  local
1523 talitos_sg_unmap(dev, edesc, req_ctx->psrc, NULL); in common_nonsnoop_hash_unmap()
1538 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_done() local
1540 if (!req_ctx->last && req_ctx->to_hash_later) { in ahash_done()
1542 memcpy(req_ctx->buf, req_ctx->bufnext, req_ctx->to_hash_later); in ahash_done()
1543 req_ctx->nbuf = req_ctx->to_hash_later; in ahash_done()
1560 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in common_nonsnoop_hash() local
1569 if (!req_ctx->first || req_ctx->swinit) { in common_nonsnoop_hash()
1571 req_ctx->hw_context_size, in common_nonsnoop_hash()
1572 (char *)req_ctx->hw_context, 0, in common_nonsnoop_hash()
1574 req_ctx->swinit = 0; in common_nonsnoop_hash()
1578 req_ctx->first = 0; in common_nonsnoop_hash()
1594 sg_count = talitos_map_sg(dev, req_ctx->psrc, in common_nonsnoop_hash()
1599 to_talitos_ptr(&desc->ptr[3], sg_dma_address(req_ctx->psrc)); in common_nonsnoop_hash()
1601 sg_count = sg_to_link_tbl(req_ctx->psrc, sg_count, length, in common_nonsnoop_hash()
1613 sg_dma_address(req_ctx->psrc)); in common_nonsnoop_hash()
1621 if (req_ctx->last) in common_nonsnoop_hash()
1627 req_ctx->hw_context_size, in common_nonsnoop_hash()
1628 req_ctx->hw_context, 0, DMA_FROM_DEVICE); in common_nonsnoop_hash()
1646 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_edesc_alloc() local
1648 return talitos_edesc_alloc(ctx->dev, NULL, req_ctx->psrc, NULL, NULL, 0, in ahash_edesc_alloc()
1655 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_init() local
1658 req_ctx->nbuf = 0; in ahash_init()
1659 req_ctx->first = 1; /* first indicates h/w must init its context */ in ahash_init()
1660 req_ctx->swinit = 0; /* assume h/w init of context */ in ahash_init()
1661 req_ctx->hw_context_size = in ahash_init()
1675 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_init_sha224_swinit() local
1678 req_ctx->swinit = 1;/* prevent h/w initting context with sha256 values*/ in ahash_init_sha224_swinit()
1680 req_ctx->hw_context[0] = SHA224_H0; in ahash_init_sha224_swinit()
1681 req_ctx->hw_context[1] = SHA224_H1; in ahash_init_sha224_swinit()
1682 req_ctx->hw_context[2] = SHA224_H2; in ahash_init_sha224_swinit()
1683 req_ctx->hw_context[3] = SHA224_H3; in ahash_init_sha224_swinit()
1684 req_ctx->hw_context[4] = SHA224_H4; in ahash_init_sha224_swinit()
1685 req_ctx->hw_context[5] = SHA224_H5; in ahash_init_sha224_swinit()
1686 req_ctx->hw_context[6] = SHA224_H6; in ahash_init_sha224_swinit()
1687 req_ctx->hw_context[7] = SHA224_H7; in ahash_init_sha224_swinit()
1690 req_ctx->hw_context[8] = 0; in ahash_init_sha224_swinit()
1691 req_ctx->hw_context[9] = 0; in ahash_init_sha224_swinit()
1700 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_process_req() local
1709 if (!req_ctx->last && (nbytes + req_ctx->nbuf <= blocksize)) { in ahash_process_req()
1713 req_ctx->buf + req_ctx->nbuf, nbytes); in ahash_process_req()
1714 req_ctx->nbuf += nbytes; in ahash_process_req()
1719 nbytes_to_hash = nbytes + req_ctx->nbuf; in ahash_process_req()
1722 if (req_ctx->last) in ahash_process_req()
1734 if (req_ctx->nbuf) { in ahash_process_req()
1735 nsg = (req_ctx->nbuf < nbytes_to_hash) ? 2 : 1; in ahash_process_req()
1736 sg_init_table(req_ctx->bufsl, nsg); in ahash_process_req()
1737 sg_set_buf(req_ctx->bufsl, req_ctx->buf, req_ctx->nbuf); in ahash_process_req()
1739 scatterwalk_sg_chain(req_ctx->bufsl, 2, areq->src); in ahash_process_req()
1740 req_ctx->psrc = req_ctx->bufsl; in ahash_process_req()
1742 req_ctx->psrc = areq->src; in ahash_process_req()
1747 req_ctx->bufnext, in ahash_process_req()
1751 req_ctx->to_hash_later = to_hash_later; in ahash_process_req()
1761 if (req_ctx->last) in ahash_process_req()
1767 if (req_ctx->first && !req_ctx->swinit) in ahash_process_req()
1773 if (ctx->keylen && (req_ctx->first || req_ctx->last)) in ahash_process_req()
1782 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_update() local
1784 req_ctx->last = 0; in ahash_update()
1791 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_final() local
1793 req_ctx->last = 1; in ahash_final()
1800 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_finup() local
1802 req_ctx->last = 1; in ahash_finup()
1809 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); in ahash_digest() local
1813 req_ctx->last = 1; in ahash_digest()