net/sfc: add pattern parsing stub to MAE backend
[dpdk.git] / drivers / net / mlx5 / mlx5.c
index 44822ad..74a537b 100644 (file)
@@ -947,10 +947,8 @@ mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn,
                goto error;
        }
        if (sh->devx) {
-               uint32_t lcore = (uint32_t)rte_lcore_to_cpu_id(-1);
-
                /* Query the EQN for this core. */
-               err = mlx5_glue->devx_query_eqn(sh->ctx, lcore, &sh->eqn);
+               err = mlx5_glue->devx_query_eqn(sh->ctx, 0, &sh->eqn);
                if (err) {
                        rte_errno = errno;
                        DRV_LOG(ERR, "Failed to query event queue number %d.",
@@ -2042,6 +2040,7 @@ static int
 mlx5_pci_remove(struct rte_pci_device *pci_dev)
 {
        uint16_t port_id;
+       int ret = 0;
 
        RTE_ETH_FOREACH_DEV_OF(port_id, &pci_dev->device) {
                /*
@@ -2049,11 +2048,11 @@ mlx5_pci_remove(struct rte_pci_device *pci_dev)
                 * call the close function explicitly for secondary process.
                 */
                if (rte_eal_process_type() == RTE_PROC_SECONDARY)
-                       mlx5_dev_close(&rte_eth_devices[port_id]);
+                       ret |= mlx5_dev_close(&rte_eth_devices[port_id]);
                else
-                       rte_eth_dev_close(port_id);
+                       ret |= rte_eth_dev_close(port_id);
        }
-       return 0;
+       return ret == 0 ? 0 : -EIO;
 }
 
 static const struct rte_pci_id mlx5_pci_id_map[] = {