- hw = IXGBE_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
-
- if (hw->adapter_stopped == 0)
- ixgbe_dev_close(eth_dev);
-
- eth_dev->dev_ops = NULL;
- eth_dev->rx_pkt_burst = NULL;
- eth_dev->tx_pkt_burst = NULL;
-
- /* Unlock any pending hardware semaphore */
- ixgbe_swfw_lock_reset(hw);
-
- /* disable uio intr before callback unregister */
- rte_intr_disable(intr_handle);
-
- do {
- ret = rte_intr_callback_unregister(intr_handle,
- ixgbe_dev_interrupt_handler, eth_dev);
- if (ret >= 0) {
- break;
- } else if (ret != -EAGAIN) {
- PMD_INIT_LOG(ERR,
- "intr callback unregister failed: %d",
- ret);
- return ret;
- }
- rte_delay_ms(100);
- } while (retries++ < (10 + IXGBE_LINK_UP_TIME));
-
- /* cancel the delay handler before remove dev */
- rte_eal_alarm_cancel(ixgbe_dev_interrupt_delayed_handler, eth_dev);
-
- /* uninitialize PF if max_vfs not zero */
- ixgbe_pf_host_uninit(eth_dev);
-
- /* remove all the fdir filters & hash */
- ixgbe_fdir_filter_uninit(eth_dev);
-
- /* remove all the L2 tunnel filters & hash */
- ixgbe_l2_tn_filter_uninit(eth_dev);
-
- /* Remove all ntuple filters of the device */
- ixgbe_ntuple_filter_uninit(eth_dev);
-
- /* clear all the filters list */
- ixgbe_filterlist_flush();
-
- /* Remove all Traffic Manager configuration */
- ixgbe_tm_conf_uninit(eth_dev);
-
-#ifdef RTE_LIBRTE_SECURITY
- rte_free(eth_dev->security_ctx);
-#endif