[2/2] net/qede: Do not stop vport if not started.
diff mbox series

Message ID 20200206200146.14808-2-manishc@marvell.com
State Accepted
Delegated to: Jerin Jacob
Headers show
Series
  • [1/2] net/qede: Fix VF re-load failure after ungraceful termination of DPDK
Related show

Checks

Context Check Description
ci/Intel-compilation fail apply issues
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK

Commit Message

Manish Chopra Feb. 6, 2020, 8:01 p.m. UTC
Stopping an already disabled vport leads to firmware
assert. Stop the vport only if it was started.

Fixes: 2ea6f76aff40 ("qede: add core driver")
Cc: stable@dpdk.org

Signed-off-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/qede_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 500440c2c..74dfe895a 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1509,7 +1509,8 @@  static void qede_dev_close(struct rte_eth_dev *eth_dev)
 	if (eth_dev->data->dev_started)
 		qede_dev_stop(eth_dev);
 
-	qede_stop_vport(edev);
+	if (qdev->vport_started)
+		qede_stop_vport(edev);
 	qdev->vport_started = false;
 	qede_fdir_dealloc_resc(eth_dev);
 	qede_dealloc_fp_resc(eth_dev);