Commit eb5818aa authored by Tero Kristo's avatar Tero Kristo Committed by Herbert Xu

crypto: omap-des - add IV output handling

Currently omap-des driver does not copy end result IV out at all. This
is evident with the additional checks done at the crypto test manager.
Fix by copying out the IV values from HW.
Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent e7508ef2
......@@ -597,6 +597,7 @@ static int omap_des_crypt_req(struct crypto_engine *engine,
static void omap_des_done_task(unsigned long data)
{
struct omap_des_dev *dd = (struct omap_des_dev *)data;
int i;
pr_debug("enter done_task\n");
......@@ -615,6 +616,11 @@ static void omap_des_done_task(unsigned long data)
omap_crypto_cleanup(&dd->out_sgl, dd->orig_out, 0, dd->total_save,
FLAGS_OUT_DATA_ST_SHIFT, dd->flags);
if ((dd->flags & FLAGS_CBC) && dd->req->iv)
for (i = 0; i < 2; i++)
((u32 *)dd->req->iv)[i] =
omap_des_read(dd, DES_REG_IV(dd, i));
omap_des_finish_req(dd, 0);
pr_debug("exit\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment