diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2018-11-14 11:13:11 +0000 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2018-11-14 11:13:28 +0000 |
commit | 8a853e3f0275efc8b05cb195085d45946942744a (patch) | |
tree | f7b349012231726c54fedd6c19f9cbf8234a4458 /drivers/crypto/octeontx | |
parent | 88fab00d4402af240c1b7cc2566133aece115488 (diff) |
New upstream version 18.11-rc3upstream/18.11-rc3
Change-Id: I958b9d019027ef049bd992b3968a667f3ae382ae
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/crypto/octeontx')
-rw-r--r-- | drivers/crypto/octeontx/otx_cryptodev.c | 2 | ||||
-rw-r--r-- | drivers/crypto/octeontx/otx_cryptodev_hw_access.c | 5 | ||||
-rw-r--r-- | drivers/crypto/octeontx/otx_cryptodev_ops.c | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/drivers/crypto/octeontx/otx_cryptodev.c b/drivers/crypto/octeontx/otx_cryptodev.c index 269f0456..b201e0a1 100644 --- a/drivers/crypto/octeontx/otx_cryptodev.c +++ b/drivers/crypto/octeontx/otx_cryptodev.c @@ -100,8 +100,8 @@ otx_cpt_pci_remove(struct rte_pci_device *pci_dev) if (rte_eal_process_type() == RTE_PROC_PRIMARY) rte_free(cryptodev->data->dev_private); - cryptodev->device = NULL; cryptodev->device->driver = NULL; + cryptodev->device = NULL; cryptodev->data = NULL; /* free metapool memory */ diff --git a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c index 5e705a83..18f2e6b1 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_hw_access.c +++ b/drivers/crypto/octeontx/otx_cryptodev_hw_access.c @@ -9,6 +9,7 @@ #include <rte_common.h> #include <rte_errno.h> #include <rte_memzone.h> +#include <rte_string_fns.h> #include "otx_cryptodev_hw_access.h" #include "otx_cryptodev_mbox.h" @@ -366,7 +367,9 @@ otx_cpt_hw_init(struct cpt_vf *cptvf, void *pdev, void *reg_base, char *name) /* Bar0 base address */ cptvf->reg_base = reg_base; - strncpy(cptvf->dev_name, name, 32); + + /* Save device name */ + strlcpy(cptvf->dev_name, name, (sizeof(cptvf->dev_name))); cptvf->pdev = pdev; diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c index 23f96591..90d0c14b 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_ops.c +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c @@ -216,7 +216,7 @@ otx_cpt_que_pair_setup(struct rte_cryptodev *dev, } ret = otx_cpt_get_resource(cptvf, 0, &instance); - if (ret != 0) { + if (ret != 0 || instance == NULL) { CPT_LOG_ERR("Error getting instance handle from device %s : " "ret = %d", dev->data->name, ret); return ret; |