net/sfc: ensure that device is closed on removal
authorAndrew Rybchenko <arybchenko@solarflare.com>
Fri, 21 Jun 2019 09:40:40 +0000 (10:40 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 4 Jul 2019 23:52:01 +0000 (01:52 +0200)
PCI device may be unplugged when ethdev is not closed yet.

Fixes: aaa3f5f0f79d ("net/sfc: add configure and close stubs")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
drivers/net/sfc/sfc_ethdev.c

index be185d5..583f31b 100644 (file)
@@ -2196,6 +2196,8 @@ sfc_eth_dev_uninit(struct rte_eth_dev *dev)
                return 0;
        }
 
+       sfc_dev_close(dev);
+
        sa = sfc_adapter_by_eth_dev(dev);
        sfc_log_init(sa, "entry");