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/bnxt: fix HWRM and FW incompatibility handling
[dpdk.git]
/
drivers
/
net
/
atlantic
/
atl_ethdev.c
diff --git
a/drivers/net/atlantic/atl_ethdev.c
b/drivers/net/atlantic/atl_ethdev.c
index
d3babef
..
473f620
100644
(file)
--- a/
drivers/net/atlantic/atl_ethdev.c
+++ b/
drivers/net/atlantic/atl_ethdev.c
@@
-3,7
+3,7
@@
*/
#include <rte_string_fns.h>
*/
#include <rte_string_fns.h>
-#include <
rte_
ethdev_pci.h>
+#include <ethdev_pci.h>
#include <rte_alarm.h>
#include "atl_ethdev.h"
#include <rte_alarm.h>
#include "atl_ethdev.h"
@@
-17,7
+17,7
@@
static int eth_atl_dev_init(struct rte_eth_dev *eth_dev);
static int atl_dev_configure(struct rte_eth_dev *dev);
static int atl_dev_start(struct rte_eth_dev *dev);
static int eth_atl_dev_init(struct rte_eth_dev *eth_dev);
static int atl_dev_configure(struct rte_eth_dev *dev);
static int atl_dev_start(struct rte_eth_dev *dev);
-static
void
atl_dev_stop(struct rte_eth_dev *dev);
+static
int
atl_dev_stop(struct rte_eth_dev *dev);
static int atl_dev_set_link_up(struct rte_eth_dev *dev);
static int atl_dev_set_link_down(struct rte_eth_dev *dev);
static int atl_dev_close(struct rte_eth_dev *dev);
static int atl_dev_set_link_up(struct rte_eth_dev *dev);
static int atl_dev_set_link_down(struct rte_eth_dev *dev);
static int atl_dev_close(struct rte_eth_dev *dev);
@@
-380,7
+380,7
@@
eth_atl_dev_init(struct rte_eth_dev *eth_dev)
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- eth_dev->data->dev_flags |= RTE_ETH_DEV_
CLOSE_REMOVE
;
+ eth_dev->data->dev_flags |= RTE_ETH_DEV_
AUTOFILL_QUEUE_XSTATS
;
/* Vendor and Device ID need to be set before init of shared code */
hw->device_id = pci_dev->id.device_id;
/* Vendor and Device ID need to be set before init of shared code */
hw->device_id = pci_dev->id.device_id;
@@
-601,7
+601,7
@@
error:
/*
* Stop device: disable rx and tx functions to allow for reconfiguring.
*/
/*
* Stop device: disable rx and tx functions to allow for reconfiguring.
*/
-static
void
+static
int
atl_dev_stop(struct rte_eth_dev *dev)
{
struct rte_eth_link link;
atl_dev_stop(struct rte_eth_dev *dev)
{
struct rte_eth_link link;
@@
-611,6
+611,7
@@
atl_dev_stop(struct rte_eth_dev *dev)
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
PMD_INIT_FUNC_TRACE();
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
PMD_INIT_FUNC_TRACE();
+ dev->data->dev_started = 0;
/* disable interrupts */
atl_disable_intr(hw);
/* disable interrupts */
atl_disable_intr(hw);
@@
-641,6
+642,8
@@
atl_dev_stop(struct rte_eth_dev *dev)
rte_free(intr_handle->intr_vec);
intr_handle->intr_vec = NULL;
}
rte_free(intr_handle->intr_vec);
intr_handle->intr_vec = NULL;
}
+
+ return 0;
}
/*
}
/*
@@
-691,6
+694,7
@@
atl_dev_close(struct rte_eth_dev *dev)
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct aq_hw_s *hw;
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
struct aq_hw_s *hw;
+ int ret;
PMD_INIT_FUNC_TRACE();
PMD_INIT_FUNC_TRACE();
@@
-699,14
+703,10
@@
atl_dev_close(struct rte_eth_dev *dev)
hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private);
hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- atl_dev_stop(dev);
+
ret =
atl_dev_stop(dev);
atl_free_queues(dev);
atl_free_queues(dev);
- dev->dev_ops = NULL;
- dev->rx_pkt_burst = NULL;
- dev->tx_pkt_burst = NULL;
-
/* disable uio intr before callback unregister */
rte_intr_disable(intr_handle);
rte_intr_callback_unregister(intr_handle,
/* disable uio intr before callback unregister */
rte_intr_disable(intr_handle);
rte_intr_callback_unregister(intr_handle,
@@
-714,7
+714,7
@@
atl_dev_close(struct rte_eth_dev *dev)
pthread_mutex_destroy(&hw->mbox_mutex);
pthread_mutex_destroy(&hw->mbox_mutex);
- return
0
;
+ return
ret
;
}
static int
}
static int