| 1053 | } |
| 1054 | |
| 1055 | int |
| 1056 | mlx5_common_dev_remove(struct rte_device *eal_dev) |
| 1057 | { |
| 1058 | struct mlx5_common_device *cdev; |
| 1059 | int ret; |
| 1060 | |
| 1061 | cdev = to_mlx5_device(eal_dev); |
| 1062 | if (!cdev) |
| 1063 | return -ENODEV; |
| 1064 | /* Matching device found, cleanup and unload drivers. */ |
| 1065 | ret = drivers_remove(cdev, cdev->classes_loaded); |
| 1066 | if (ret == 0) |
| 1067 | mlx5_common_dev_release(cdev); |
| 1068 | return ret; |
| 1069 | } |
| 1070 | |
| 1071 | /** |
| 1072 | * Callback to DMA map external memory to a device. |
no test coverage detected