File Index
Files and directories
Sign in
FILE

pci_vsc.h

File preview with syntax highlighting.

linux-6.19.14/drivers/net/ethernet/mellanox/mlx5/core/lib/pci_vsc.h C
 1/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
 2/* Copyright (c) 2019 Mellanox Technologies */
 3
 4#ifndef __MLX5_PCI_VSC_H__
 5#define __MLX5_PCI_VSC_H__
 6
 7enum mlx5_vsc_state {
 8	MLX5_VSC_UNLOCK,
 9	MLX5_VSC_LOCK,
10};
11
12enum {
13	MLX5_VSC_SPACE_SCAN_CRSPACE = 0x7,
14};
15
16void mlx5_pci_vsc_init(struct mlx5_core_dev *dev);
17int mlx5_vsc_gw_lock(struct mlx5_core_dev *dev);
18int mlx5_vsc_gw_unlock(struct mlx5_core_dev *dev);
19int mlx5_vsc_gw_set_space(struct mlx5_core_dev *dev, u16 space,
20			  u32 *ret_space_size);
21int mlx5_vsc_gw_read_block_fast(struct mlx5_core_dev *dev, u32 *data,
22				int length);
23
24static inline bool mlx5_vsc_accessible(struct mlx5_core_dev *dev)
25{
26	return !!dev->vsc_addr;
27}
28
29int mlx5_vsc_sem_set_space(struct mlx5_core_dev *dev, u16 space,
30			   enum mlx5_vsc_state state);
31
32#endif /* __MLX5_PCI_VSC_H__ */
~/ Read-only file preview.