net/qede: do not stop vport if not started
authorManish Chopra <manishc@marvell.com>
Thu, 6 Feb 2020 20:01:46 +0000 (12:01 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Feb 2020 12:51:06 +0000 (13:51 +0100)
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

index 500440c..74dfe89 100644 (file)
@@ -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);