0001
0002
0003
0004 #ifndef __MLX5_ECPF_H__
0005 #define __MLX5_ECPF_H__
0006
0007 #include <linux/mlx5/driver.h>
0008 #include "mlx5_core.h"
0009
0010 #ifdef CONFIG_MLX5_ESWITCH
0011
0012 enum {
0013 MLX5_ECPU_BIT_NUM = 23,
0014 };
0015
0016 bool mlx5_read_embedded_cpu(struct mlx5_core_dev *dev);
0017 int mlx5_ec_init(struct mlx5_core_dev *dev);
0018 void mlx5_ec_cleanup(struct mlx5_core_dev *dev);
0019
0020 int mlx5_cmd_host_pf_enable_hca(struct mlx5_core_dev *dev);
0021 int mlx5_cmd_host_pf_disable_hca(struct mlx5_core_dev *dev);
0022
0023 #else
0024
0025 static inline bool
0026 mlx5_read_embedded_cpu(struct mlx5_core_dev *dev) { return false; }
0027 static inline int mlx5_ec_init(struct mlx5_core_dev *dev) { return 0; }
0028 static inline void mlx5_ec_cleanup(struct mlx5_core_dev *dev) {}
0029
0030 #endif
0031
0032 #endif