* Uninitialize all HW global of device context. * * @param cdev * Pointer to mlx5 device structure. * * @return * 0 on success, a negative errno value otherwise and rte_errno is set. */
| 666 | * 0 on success, a negative errno value otherwise and rte_errno is set. |
| 667 | */ |
| 668 | static void |
| 669 | mlx5_dev_hw_global_release(struct mlx5_common_device *cdev) |
| 670 | { |
| 671 | if (cdev->pd != NULL) { |
| 672 | claim_zero(mlx5_os_pd_release(cdev)); |
| 673 | cdev->pd = NULL; |
| 674 | } |
| 675 | if (cdev->ctx != NULL) { |
| 676 | claim_zero(mlx5_glue->close_device(cdev->ctx)); |
| 677 | cdev->ctx = NULL; |
| 678 | } |
| 679 | } |
| 680 | |
| 681 | /** |
| 682 | * Initialize all HW global of device context. |
no test coverage detected