net/mlx5: Expose PCAM, MCAM registers infrastructure

PCAM: Ports capabilities mask register.
MCAM: Management capabilities mask register.

PCAM and MCAM registers will provide information regarding firmware
support for different features, in order to avoid cases where new driver
combined with old firmware results in syndromes (for ex. PCIe counters
before this patchset).

Signed-off-by: Gal Pressman <galp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
Gal Pressman
2016-12-08 15:52:00 +02:00
committed by Saeed Mahameed
parent 8a271746a2
commit cfdcbceaef
3 changed files with 77 additions and 1 deletions

View File

@@ -970,6 +970,22 @@ enum mlx5_cap_type {
MLX5_CAP_NUM
};
enum mlx5_pcam_reg_groups {
MLX5_PCAM_REGS_5000_TO_507F = 0x0,
};
enum mlx5_pcam_feature_groups {
MLX5_PCAM_FEATURE_ENHANCED_FEATURES = 0x0,
};
enum mlx5_mcam_reg_groups {
MLX5_MCAM_REGS_FIRST_128 = 0x0,
};
enum mlx5_mcam_feature_groups {
MLX5_MCAM_FEATURE_ENHANCED_FEATURES = 0x0,
};
/* GET Dev Caps macros */
#define MLX5_CAP_GEN(mdev, cap) \
MLX5_GET(cmd_hca_cap, mdev->hca_caps_cur[MLX5_CAP_GENERAL], cap)