Lines Matching refs:fc

395 			if (msc->fc > NX_MAX_FC || msc->mode > NX_MAX_MODE) {  in nx_of_update_msc()
397 "combo: %d/%d (ignored)\n", msc->fc, in nx_of_update_msc()
412 props->ap[msc->fc][msc->mode][0].databytelen = in nx_of_update_msc()
414 props->ap[msc->fc][msc->mode][0].sglen = in nx_of_update_msc()
418 props->ap[msc->fc][msc->mode][1].databytelen = in nx_of_update_msc()
420 props->ap[msc->fc][msc->mode][1].sglen = in nx_of_update_msc()
424 if (msc->fc == NX_FC_AES) { in nx_of_update_msc()
425 props->ap[msc->fc][msc->mode][2]. in nx_of_update_msc()
427 props->ap[msc->fc][msc->mode][2].sglen = in nx_of_update_msc()
429 } else if (msc->fc == NX_FC_AES_HMAC || in nx_of_update_msc()
430 msc->fc == NX_FC_SHA) { in nx_of_update_msc()
431 props->ap[msc->fc][msc->mode][1]. in nx_of_update_msc()
433 props->ap[msc->fc][msc->mode][1].sglen = in nx_of_update_msc()
438 ": (%u/256)\n", msc->fc); in nx_of_update_msc()
442 props->ap[msc->fc][msc->mode][2].databytelen = in nx_of_update_msc()
444 props->ap[msc->fc][msc->mode][2].sglen = in nx_of_update_msc()
449 "len combo: (%u/%u)\n", msc->fc, in nx_of_update_msc()
501 static bool nx_check_prop(struct device *dev, u32 fc, u32 mode, int slot) in nx_check_prop() argument
503 struct alg_props *props = &nx_driver.of.ap[fc][mode][slot]; in nx_check_prop()
508 "%u/%u (ignored)\n", fc, mode, slot, in nx_check_prop()
516 static bool nx_check_props(struct device *dev, u32 fc, u32 mode) in nx_check_props() argument
521 if (!nx_check_prop(dev, fc, mode, i)) in nx_check_props()
527 static int nx_register_alg(struct crypto_alg *alg, u32 fc, u32 mode) in nx_register_alg() argument
529 return nx_check_props(&nx_driver.viodev->dev, fc, mode) ? in nx_register_alg()
533 static int nx_register_aead(struct aead_alg *alg, u32 fc, u32 mode) in nx_register_aead() argument
535 return nx_check_props(&nx_driver.viodev->dev, fc, mode) ? in nx_register_aead()
539 static int nx_register_shash(struct shash_alg *alg, u32 fc, u32 mode, int slot) in nx_register_shash() argument
542 fc, mode, slot) : in nx_register_shash()
543 nx_check_props(&nx_driver.viodev->dev, fc, mode)) ? in nx_register_shash()
547 static void nx_unregister_alg(struct crypto_alg *alg, u32 fc, u32 mode) in nx_unregister_alg() argument
549 if (nx_check_props(NULL, fc, mode)) in nx_unregister_alg()
553 static void nx_unregister_aead(struct aead_alg *alg, u32 fc, u32 mode) in nx_unregister_aead() argument
555 if (nx_check_props(NULL, fc, mode)) in nx_unregister_aead()
559 static void nx_unregister_shash(struct shash_alg *alg, u32 fc, u32 mode, in nx_unregister_shash() argument
562 if (slot >= 0 ? nx_check_prop(NULL, fc, mode, slot) : in nx_unregister_shash()
563 nx_check_props(NULL, fc, mode)) in nx_unregister_shash()
667 static int nx_crypto_ctx_init(struct nx_crypto_ctx *nx_ctx, u32 fc, u32 mode) in nx_crypto_ctx_init() argument
701 memcpy(nx_ctx->props, nx_driver.of.ap[fc][mode], in nx_crypto_ctx_init()