git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/qede: fix incorrect link status update
[dpdk.git]
/
drivers
/
net
/
bnx2x
/
bnx2x_ethdev.c
diff --git
a/drivers/net/bnx2x/bnx2x_ethdev.c
b/drivers/net/bnx2x/bnx2x_ethdev.c
index
6ccbb99
..
6a9cd58
100644
(file)
--- a/
drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/
drivers/net/bnx2x/bnx2x_ethdev.c
@@
-1,9
+1,9
@@
/*
* Copyright (c) 2013-2015 Brocade Communications Systems, Inc.
*
/*
* Copyright (c) 2013-2015 Brocade Communications Systems, Inc.
*
- * Copyright (c) 2015
QLogic Corporation
.
+ * Copyright (c) 2015
-2018 Cavium Inc
.
* All rights reserved.
* All rights reserved.
- * www.
qlogic
.com
+ * www.
cavium
.com
*
* See LICENSE.bnx2x_pmd for copyright and licensing details.
*/
*
* See LICENSE.bnx2x_pmd for copyright and licensing details.
*/
@@
-644,24
+644,14
@@
static struct rte_pci_driver rte_bnx2xvf_pmd;
static int eth_bnx2x_pci_probe(struct rte_pci_driver *pci_drv,
struct rte_pci_device *pci_dev)
{
static int eth_bnx2x_pci_probe(struct rte_pci_driver *pci_drv,
struct rte_pci_device *pci_dev)
{
- struct rte_eth_dev *eth_dev;
- int ret;
-
- eth_dev = rte_eth_dev_pci_allocate(pci_dev, sizeof(struct bnx2x_softc));
- if (!eth_dev)
- return -ENOMEM;
-
if (pci_drv == &rte_bnx2x_pmd)
if (pci_drv == &rte_bnx2x_pmd)
- ret = eth_bnx2x_dev_init(eth_dev);
+ return rte_eth_dev_pci_generic_probe(pci_dev,
+ sizeof(struct bnx2x_softc), eth_bnx2x_dev_init);
else if (pci_drv == &rte_bnx2xvf_pmd)
else if (pci_drv == &rte_bnx2xvf_pmd)
- ret = eth_bnx2xvf_dev_init(eth_dev);
+ return rte_eth_dev_pci_generic_probe(pci_dev,
+ sizeof(struct bnx2x_softc), eth_bnx2xvf_dev_init);
else
else
- ret = -EINVAL;
-
- if (ret)
- rte_eth_dev_pci_release(eth_dev);
-
- return ret;
+ return -EINVAL;
}
static int eth_bnx2x_pci_remove(struct rte_pci_device *pci_dev)
}
static int eth_bnx2x_pci_remove(struct rte_pci_device *pci_dev)