Lines Matching defs:mode
382 if (msc->fc >= NX_MAX_FC || msc->mode >= NX_MAX_MODE) {
383 dev_err(dev, "unknown function code/mode "
385 msc->mode);
399 props->ap[msc->fc][msc->mode][0].databytelen =
401 props->ap[msc->fc][msc->mode][0].sglen =
405 props->ap[msc->fc][msc->mode][1].databytelen =
407 props->ap[msc->fc][msc->mode][1].sglen =
412 props->ap[msc->fc][msc->mode][2].
414 props->ap[msc->fc][msc->mode][2].sglen =
418 props->ap[msc->fc][msc->mode][1].
420 props->ap[msc->fc][msc->mode][1].sglen =
429 props->ap[msc->fc][msc->mode][2].databytelen =
431 props->ap[msc->fc][msc->mode][2].sglen =
488 static bool nx_check_prop(struct device *dev, u32 fc, u32 mode, int slot)
490 struct alg_props *props = &nx_driver.of.ap[fc][mode][slot];
495 "%u/%u (ignored)\n", fc, mode, slot,
503 static bool nx_check_props(struct device *dev, u32 fc, u32 mode)
508 if (!nx_check_prop(dev, fc, mode, i))
514 static int nx_register_skcipher(struct skcipher_alg *alg, u32 fc, u32 mode)
516 return nx_check_props(&nx_driver.viodev->dev, fc, mode) ?
520 static int nx_register_aead(struct aead_alg *alg, u32 fc, u32 mode)
522 return nx_check_props(&nx_driver.viodev->dev, fc, mode) ?
526 static int nx_register_shash(struct shash_alg *alg, u32 fc, u32 mode, int slot)
529 fc, mode, slot) :
530 nx_check_props(&nx_driver.viodev->dev, fc, mode)) ?
534 static void nx_unregister_skcipher(struct skcipher_alg *alg, u32 fc, u32 mode)
536 if (nx_check_props(NULL, fc, mode))
540 static void nx_unregister_aead(struct aead_alg *alg, u32 fc, u32 mode)
542 if (nx_check_props(NULL, fc, mode))
546 static void nx_unregister_shash(struct shash_alg *alg, u32 fc, u32 mode,
549 if (slot >= 0 ? nx_check_prop(NULL, fc, mode, slot) :
550 nx_check_props(NULL, fc, mode))
651 * @mode: the function code specific mode for this context
653 static int nx_crypto_ctx_init(struct nx_crypto_ctx *nx_ctx, u32 fc, u32 mode)
662 if (mode == NX_MODE_AES_GCM || mode == NX_MODE_AES_CCM)
679 if (mode == NX_MODE_AES_GCM || mode == NX_MODE_AES_CCM)
687 memcpy(nx_ctx->props, nx_driver.of.ap[fc][mode],