]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/crypto/amcc/crypto4xx_core.c
crypto: crypto4xx - remove double assignment of pd_uinfo->state
[mirror_ubuntu-bionic-kernel.git] / drivers / crypto / amcc / crypto4xx_core.c
index 65dc78b91dea0147e454a5f9fdb20ed4bf024510..9e96af725b312391a97dfd77873083e5200deffc 100644 (file)
@@ -962,7 +962,7 @@ u32 crypto4xx_build_pd(struct crypto_async_request *req,
 
        sa->sa_command_1.bf.hash_crypto_offset = 0;
        pd->pd_ctl.w = ctx->pd_ctl;
-       pd->pd_ctl_len.w = 0x00400000 | (ctx->bypass << 24) | datalen;
+       pd->pd_ctl_len.w = 0x00400000 | datalen;
        pd_uinfo->state = PD_ENTRY_INUSE;
        wmb();
        /* write any value to push engine to read a pd */
@@ -1033,12 +1033,10 @@ int crypto4xx_register_alg(struct crypto4xx_device *sec_dev,
                        break;
                }
 
-               if (rc) {
-                       list_del(&alg->entry);
+               if (rc)
                        kfree(alg);
-               } else {
+               else
                        list_add_tail(&alg->entry, &sec_dev->alg_list);
-               }
        }
 
        return 0;
@@ -1081,7 +1079,6 @@ static void crypto4xx_bh_tasklet_cb(unsigned long data)
                        pd->pd_ctl.bf.pe_done = 0;
                        crypto4xx_pd_done(core_dev->dev, tail);
                        crypto4xx_put_pd_to_pdr(core_dev->dev, tail);
-                       pd_uinfo->state = PD_ENTRY_FREE;
                } else {
                        /* if tail not done, break */
                        break;
@@ -1116,7 +1113,9 @@ struct crypto4xx_alg_common crypto4xx_alg[] = {
                .cra_name       = "cbc(aes)",
                .cra_driver_name = "cbc-aes-ppc4xx",
                .cra_priority   = CRYPTO4XX_CRYPTO_PRIORITY,
-               .cra_flags      = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
+               .cra_flags      = CRYPTO_ALG_TYPE_ABLKCIPHER |
+                                 CRYPTO_ALG_ASYNC |
+                                 CRYPTO_ALG_KERN_DRIVER_ONLY,
                .cra_blocksize  = AES_BLOCK_SIZE,
                .cra_ctxsize    = sizeof(struct crypto4xx_ctx),
                .cra_type       = &crypto_ablkcipher_type,