Lines Matching refs:ss

124 	struct sun8i_ss_dev *ss = op->ss;  in sun8i_ss_setup_ivs()  local
130 struct sun8i_ss_flow *sf = &ss->flows[rctx->flow]; in sun8i_ss_setup_ivs()
150 a = dma_map_single(ss->dev, sf->iv[i], ivsize, DMA_TO_DEVICE); in sun8i_ss_setup_ivs()
151 if (dma_mapping_error(ss->dev, a)) { in sun8i_ss_setup_ivs()
153 dev_err(ss->dev, "Cannot DMA MAP IV\n"); in sun8i_ss_setup_ivs()
176 dma_unmap_single(ss->dev, rctx->p_iv[i], ivsize, DMA_TO_DEVICE); in sun8i_ss_setup_ivs()
187 struct sun8i_ss_dev *ss = op->ss; in sun8i_ss_cipher() local
191 struct sun8i_ss_flow *sf = &ss->flows[rctx->flow]; in sun8i_ss_cipher()
203 dev_dbg(ss->dev, "%s %s %u %x IV(%p %u) key=%u\n", __func__, in sun8i_ss_cipher()
213 rctx->op_mode = ss->variant->op_mode[algt->ss_blockmode]; in sun8i_ss_cipher()
214 rctx->method = ss->variant->alg_cipher[algt->ss_algo_id]; in sun8i_ss_cipher()
217 rctx->p_key = dma_map_single(ss->dev, op->key, op->keylen, DMA_TO_DEVICE); in sun8i_ss_cipher()
218 if (dma_mapping_error(ss->dev, rctx->p_key)) { in sun8i_ss_cipher()
219 dev_err(ss->dev, "Cannot DMA MAP KEY\n"); in sun8i_ss_cipher()
231 nr_sgs = dma_map_sg(ss->dev, areq->src, nsgs, DMA_BIDIRECTIONAL); in sun8i_ss_cipher()
233 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ss_cipher()
239 nr_sgs = dma_map_sg(ss->dev, areq->src, nsgs, DMA_TO_DEVICE); in sun8i_ss_cipher()
241 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ss_cipher()
245 nr_sgd = dma_map_sg(ss->dev, areq->dst, nsgd, DMA_FROM_DEVICE); in sun8i_ss_cipher()
247 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgd); in sun8i_ss_cipher()
262 dev_dbg(ss->dev, "%s total=%u SGS(%d %u off=%d) todo=%u\n", __func__, in sun8i_ss_cipher()
270 dev_err(ss->dev, "remaining len %d\n", len); in sun8i_ss_cipher()
284 dev_dbg(ss->dev, "%s total=%u SGD(%d %u off=%d) todo=%u\n", __func__, in sun8i_ss_cipher()
292 dev_err(ss->dev, "remaining len %d\n", len); in sun8i_ss_cipher()
297 err = sun8i_ss_run_task(ss, rctx, crypto_tfm_alg_name(areq->base.tfm)); in sun8i_ss_cipher()
301 dma_unmap_sg(ss->dev, areq->src, nsgs, DMA_BIDIRECTIONAL); in sun8i_ss_cipher()
303 dma_unmap_sg(ss->dev, areq->src, nsgs, DMA_TO_DEVICE); in sun8i_ss_cipher()
304 dma_unmap_sg(ss->dev, areq->dst, nsgd, DMA_FROM_DEVICE); in sun8i_ss_cipher()
310 dma_unmap_single(ss->dev, rctx->p_iv[i], ivsize, DMA_TO_DEVICE); in sun8i_ss_cipher()
325 dma_unmap_single(ss->dev, rctx->p_key, op->keylen, DMA_TO_DEVICE); in sun8i_ss_cipher()
359 e = sun8i_ss_get_engine_number(op->ss); in sun8i_ss_skdecrypt()
360 engine = op->ss->flows[e].engine; in sun8i_ss_skdecrypt()
380 e = sun8i_ss_get_engine_number(op->ss); in sun8i_ss_skencrypt()
381 engine = op->ss->flows[e].engine; in sun8i_ss_skencrypt()
399 op->ss = algt->ss; in sun8i_ss_cipher_init()
403 dev_err(op->ss->dev, "ERROR: Cannot allocate fallback for %s %ld\n", in sun8i_ss_cipher_init()
416 err = pm_runtime_resume_and_get(op->ss->dev); in sun8i_ss_cipher_init()
418 dev_err(op->ss->dev, "pm error %d\n", err); in sun8i_ss_cipher_init()
434 pm_runtime_put_sync(op->ss->dev); in sun8i_ss_cipher_exit()
441 struct sun8i_ss_dev *ss = op->ss; in sun8i_ss_aes_setkey() local
451 dev_dbg(ss->dev, "ERROR: Invalid keylen %u\n", keylen); in sun8i_ss_aes_setkey()
470 struct sun8i_ss_dev *ss = op->ss; in sun8i_ss_des3_setkey() local
473 dev_dbg(ss->dev, "Invalid keylen %u\n", keylen); in sun8i_ss_des3_setkey()