1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2 /* Copyright (c) 2019 Mellanox Technologies */
4 #ifndef __MLX5_PCI_VSC_H__
5 #define __MLX5_PCI_VSC_H__
13 MLX5_VSC_SPACE_SCAN_CRSPACE = 0x7,
16 void mlx5_pci_vsc_init(struct mlx5_core_dev *dev);
17 int mlx5_vsc_gw_lock(struct mlx5_core_dev *dev);
18 int mlx5_vsc_gw_unlock(struct mlx5_core_dev *dev);
19 int mlx5_vsc_gw_set_space(struct mlx5_core_dev *dev, u16 space,
21 int mlx5_vsc_gw_read_block_fast(struct mlx5_core_dev *dev, u32 *data,
24 static inline bool mlx5_vsc_accessible(struct mlx5_core_dev *dev)
26 return !!dev->vsc_addr;
29 int mlx5_vsc_sem_set_space(struct mlx5_core_dev *dev, u16 space,
30 enum mlx5_vsc_state state);
32 #endif /* __MLX5_PCI_VSC_H__ */