ret = eth_ark_dev_init(eth_dev);
if (ret)
- rte_eth_dev_pci_release(eth_dev);
+ rte_eth_dev_release_port(eth_dev);
return ret;
}
if (rc)
return rc;
- rte_eth_dev_pci_release(eth_dev);
+ rte_eth_dev_release_port(eth_dev);
}
/* Nothing to be done for secondary processes */
for (i = from; i < to; i++) {
rte_szedata2_eth_dev_uninit(eth_devs[i]);
- rte_eth_dev_pci_release(eth_devs[i]);
+ rte_eth_dev_release_port(eth_devs[i]);
}
}
if (ret != 0) {
PMD_INIT_LOG(ERR, "Failed to init eth_dev for port %u",
i);
- rte_eth_dev_pci_release(eth_devs[i]);
+ rte_eth_dev_release_port(eth_devs[i]);
szedata2_eth_dev_release_interval(eth_devs, 0, i);
rte_free(list_entry);
return ret;
retval = retval ? retval : ret;
}
- rte_eth_dev_pci_release(eth_dev);
+ rte_eth_dev_release_port(eth_dev);
}
return retval;
rte_spinlock_lock(&rte_eth_dev_shared_data->ownership_lock);
eth_dev->state = RTE_ETH_DEV_UNUSED;
+ eth_dev->device = NULL;
+ eth_dev->intr_handle = NULL;
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
rte_free(eth_dev->data->rx_queues);
return eth_dev;
}
-static inline void
-rte_eth_dev_pci_release(struct rte_eth_dev *eth_dev)
-{
- eth_dev->device = NULL;
- eth_dev->intr_handle = NULL;
-
- /* free ether device */
- rte_eth_dev_release_port(eth_dev);
-}
-
typedef int (*eth_dev_pci_callback_t)(struct rte_eth_dev *eth_dev);
/**
RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL);
ret = dev_init(eth_dev);
if (ret)
- rte_eth_dev_pci_release(eth_dev);
+ rte_eth_dev_release_port(eth_dev);
else
rte_eth_dev_probing_finish(eth_dev);
return ret;
}
- rte_eth_dev_pci_release(eth_dev);
+ rte_eth_dev_release_port(eth_dev);
return 0;
}