]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
crypto: hisilicon - Remove module_param uacce_mode
authorZhangfei Gao <zhangfei.gao@linaro.org>
Tue, 11 Feb 2020 07:54:24 +0000 (15:54 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 22 Feb 2020 01:25:42 +0000 (09:25 +0800)
Remove the module_param uacce_mode, which is not used currently.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/zip/zip_main.c

index f4aec18a25b49c9c2f53a44733a93781d9f7a155..868e32c2d4e52b2a53ca6e82c38bb1323fa1bb9c 100644 (file)
@@ -301,9 +301,6 @@ static u32 pf_q_num = HZIP_PF_DEF_Q_NUM;
 module_param_cb(pf_q_num, &pf_q_num_ops, &pf_q_num, 0444);
 MODULE_PARM_DESC(pf_q_num, "Number of queues in PF(v1 1-4096, v2 1-1024)");
 
-static int uacce_mode;
-module_param(uacce_mode, int, 0);
-
 static u32 vfs_num;
 module_param(vfs_num, uint, 0444);
 MODULE_PARM_DESC(vfs_num, "Number of VFs to enable(1-63)");
@@ -841,6 +838,7 @@ static int hisi_zip_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        pci_set_drvdata(pdev, hisi_zip);
 
        qm = &hisi_zip->qm;
+       qm->use_dma_api = true;
        qm->pdev = pdev;
        qm->ver = rev_id;
 
@@ -848,20 +846,6 @@ static int hisi_zip_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        qm->dev_name = hisi_zip_name;
        qm->fun_type = (pdev->device == PCI_DEVICE_ID_ZIP_PF) ? QM_HW_PF :
                                                                QM_HW_VF;
-       switch (uacce_mode) {
-       case 0:
-               qm->use_dma_api = true;
-               break;
-       case 1:
-               qm->use_dma_api = false;
-               break;
-       case 2:
-               qm->use_dma_api = true;
-               break;
-       default:
-               return -EINVAL;
-       }
-
        ret = hisi_qm_init(qm);
        if (ret) {
                dev_err(&pdev->dev, "Failed to init qm!\n");
@@ -981,12 +965,10 @@ static int __init hisi_zip_init(void)
                goto err_pci;
        }
 
-       if (uacce_mode == 0 || uacce_mode == 2) {
-               ret = hisi_zip_register_to_crypto();
-               if (ret < 0) {
-                       pr_err("Failed to register driver to crypto.\n");
-                       goto err_crypto;
-               }
+       ret = hisi_zip_register_to_crypto();
+       if (ret < 0) {
+               pr_err("Failed to register driver to crypto.\n");
+               goto err_crypto;
        }
 
        return 0;
@@ -1001,8 +983,7 @@ err_pci:
 
 static void __exit hisi_zip_exit(void)
 {
-       if (uacce_mode == 0 || uacce_mode == 2)
-               hisi_zip_unregister_from_crypto();
+       hisi_zip_unregister_from_crypto();
        pci_unregister_driver(&hisi_zip_pci_driver);
        hisi_zip_unregister_debugfs();
 }