* Reset and stop device. */
| 684 | * Reset and stop device. |
| 685 | */ |
| 686 | static int |
| 687 | atl_dev_close(struct rte_eth_dev *dev) |
| 688 | { |
| 689 | struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev); |
| 690 | struct rte_intr_handle *intr_handle = pci_dev->intr_handle; |
| 691 | struct aq_hw_s *hw; |
| 692 | int ret; |
| 693 | |
| 694 | PMD_INIT_FUNC_TRACE(); |
| 695 | |
| 696 | if (rte_eal_process_type() != RTE_PROC_PRIMARY) |
| 697 | return 0; |
| 698 | |
| 699 | hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private); |
| 700 | |
| 701 | ret = atl_dev_stop(dev); |
| 702 | |
| 703 | atl_free_queues(dev); |
| 704 | |
| 705 | /* disable uio intr before callback unregister */ |
| 706 | rte_intr_disable(intr_handle); |
| 707 | rte_intr_callback_unregister(intr_handle, |
| 708 | atl_dev_interrupt_handler, dev); |
| 709 | |
| 710 | pthread_mutex_destroy(&hw->mbox_mutex); |
| 711 | |
| 712 | return ret; |
| 713 | } |
| 714 | |
| 715 | static int |
| 716 | atl_dev_reset(struct rte_eth_dev *dev) |
no test coverage detected