MCPcopy Create free account
hub / github.com/F-Stack/f-stack / eth_em_close

Function eth_em_close

dpdk/drivers/net/e1000/em_ethdev.c:783–809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781}
782
783static int
784eth_em_close(struct rte_eth_dev *dev)
785{
786 struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
787 struct e1000_adapter *adapter =
788 E1000_DEV_PRIVATE(dev->data->dev_private);
789 struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
790 struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
791 int ret;
792
793 if (rte_eal_process_type() != RTE_PROC_PRIMARY)
794 return 0;
795
796 ret = eth_em_stop(dev);
797 adapter->stopped = 1;
798 em_dev_free_queues(dev);
799 e1000_phy_hw_reset(hw);
800 em_release_manageability(hw);
801 em_hw_control_release(hw);
802
803 /* disable uio intr before callback unregister */
804 rte_intr_disable(intr_handle);
805 rte_intr_callback_unregister(intr_handle,
806 eth_em_interrupt_handler, dev);
807
808 return ret;
809}
810
811static int
812em_get_rx_buffer_size(struct e1000_hw *hw)

Callers 1

eth_em_dev_uninitFunction · 0.85

Calls 8

rte_eal_process_typeFunction · 0.85
eth_em_stopFunction · 0.85
em_dev_free_queuesFunction · 0.85
e1000_phy_hw_resetFunction · 0.85
em_release_manageabilityFunction · 0.85
em_hw_control_releaseFunction · 0.85
rte_intr_disableFunction · 0.50

Tested by

no test coverage detected