summaryrefslogtreecommitdiffstats
path: root/drivers/net/enic/enic_ethdev.c
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo.salveti@linaro.org>2016-07-18 15:30:53 -0300
committerRicardo Salveti <ricardo.salveti@linaro.org>2016-07-18 15:31:22 -0300
commit5d4e5dcd8a186778b3d78e27c81550d07a288fd2 (patch)
treeb84800fce31e7233445a7997c19df409c2a364ea /drivers/net/enic/enic_ethdev.c
parenta41e6ff15809d40e0f9bbc9576bf8f7f80fbec1d (diff)
Imported Upstream version 16.07-rc3
Change-Id: I321148bfa234858ba1986d109470b7aa280cd429 Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Diffstat (limited to 'drivers/net/enic/enic_ethdev.c')
-rw-r--r--drivers/net/enic/enic_ethdev.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 3c87b49e..59082d2a 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -142,9 +142,21 @@ static int enicpmd_dev_setup_intr(struct enic *enic)
if (!enic->cq[index].ctrl)
break;
}
-
if (enic->cq_count != index)
return 0;
+ for (index = 0; index < enic->wq_count; index++) {
+ if (!enic->wq[index].ctrl)
+ break;
+ }
+ if (enic->wq_count != index)
+ return 0;
+ /* check start of packet (SOP) RQs only in case scatter is disabled. */
+ for (index = 0; index < enic->rq_count; index++) {
+ if (!enic->rq[enic_sop_rq(index)].ctrl)
+ break;
+ }
+ if (enic->rq_count != index)
+ return 0;
ret = enic_alloc_intr_resources(enic);
if (ret) {
@@ -196,7 +208,6 @@ static int enicpmd_dev_tx_queue_start(struct rte_eth_dev *eth_dev,
ENICPMD_FUNC_TRACE();
enic_start_wq(enic, queue_idx);
- eth_dev->data->tx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STARTED;
return 0;
}
@@ -212,8 +223,6 @@ static int enicpmd_dev_tx_queue_stop(struct rte_eth_dev *eth_dev,
ret = enic_stop_wq(enic, queue_idx);
if (ret)
dev_err(enic, "error in stopping wq %d\n", queue_idx);
- else
- eth_dev->data->tx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED;
return ret;
}
@@ -226,7 +235,6 @@ static int enicpmd_dev_rx_queue_start(struct rte_eth_dev *eth_dev,
ENICPMD_FUNC_TRACE();
enic_start_rq(enic, queue_idx);
- eth_dev->data->rx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STARTED;
return 0;
}
@@ -242,8 +250,6 @@ static int enicpmd_dev_rx_queue_stop(struct rte_eth_dev *eth_dev,
ret = enic_stop_rq(enic, queue_idx);
if (ret)
dev_err(enic, "error in stopping rq %d\n", queue_idx);
- else
- eth_dev->data->rx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED;
return ret;
}