Skip to content

Commit 8cca30a

Browse files
noaosrleon
authored andcommitted
net/mlx5: Expose mlx5e_link_mode
The mlx5e_link_mode enumeration will also be used in mlx5_ib for RoCE. This patch moves the enumeration to the mlx5 driver port header file. Signed-off-by: Noa Osherovich <[email protected]> Signed-off-by: Eran Ben Elisha <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 2e353b3 commit 8cca30a

File tree

2 files changed

+33
-34
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core
  • include/linux/mlx5

2 files changed

+33
-34
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en.h

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -651,40 +651,6 @@ struct mlx5e_priv {
651651
void *ppriv;
652652
};
653653

654-
enum mlx5e_link_mode {
655-
MLX5E_1000BASE_CX_SGMII = 0,
656-
MLX5E_1000BASE_KX = 1,
657-
MLX5E_10GBASE_CX4 = 2,
658-
MLX5E_10GBASE_KX4 = 3,
659-
MLX5E_10GBASE_KR = 4,
660-
MLX5E_20GBASE_KR2 = 5,
661-
MLX5E_40GBASE_CR4 = 6,
662-
MLX5E_40GBASE_KR4 = 7,
663-
MLX5E_56GBASE_R4 = 8,
664-
MLX5E_10GBASE_CR = 12,
665-
MLX5E_10GBASE_SR = 13,
666-
MLX5E_10GBASE_ER = 14,
667-
MLX5E_40GBASE_SR4 = 15,
668-
MLX5E_40GBASE_LR4 = 16,
669-
MLX5E_50GBASE_SR2 = 18,
670-
MLX5E_100GBASE_CR4 = 20,
671-
MLX5E_100GBASE_SR4 = 21,
672-
MLX5E_100GBASE_KR4 = 22,
673-
MLX5E_100GBASE_LR4 = 23,
674-
MLX5E_100BASE_TX = 24,
675-
MLX5E_1000BASE_T = 25,
676-
MLX5E_10GBASE_T = 26,
677-
MLX5E_25GBASE_CR = 27,
678-
MLX5E_25GBASE_KR = 28,
679-
MLX5E_25GBASE_SR = 29,
680-
MLX5E_50GBASE_CR2 = 30,
681-
MLX5E_50GBASE_KR2 = 31,
682-
MLX5E_LINK_MODES_NUMBER,
683-
};
684-
685-
#define MLX5E_PROT_MASK(link_mode) (1 << link_mode)
686-
687-
688654
void mlx5e_build_ptys2ethtool_map(void);
689655

690656
void mlx5e_send_nop(struct mlx5e_sq *sq, bool notify_hw);

include/linux/mlx5/port.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,39 @@ enum mlx5_an_status {
6161
#define MLX5_I2C_ADDR_HIGH 0x51
6262
#define MLX5_EEPROM_PAGE_LENGTH 256
6363

64+
enum mlx5e_link_mode {
65+
MLX5E_1000BASE_CX_SGMII = 0,
66+
MLX5E_1000BASE_KX = 1,
67+
MLX5E_10GBASE_CX4 = 2,
68+
MLX5E_10GBASE_KX4 = 3,
69+
MLX5E_10GBASE_KR = 4,
70+
MLX5E_20GBASE_KR2 = 5,
71+
MLX5E_40GBASE_CR4 = 6,
72+
MLX5E_40GBASE_KR4 = 7,
73+
MLX5E_56GBASE_R4 = 8,
74+
MLX5E_10GBASE_CR = 12,
75+
MLX5E_10GBASE_SR = 13,
76+
MLX5E_10GBASE_ER = 14,
77+
MLX5E_40GBASE_SR4 = 15,
78+
MLX5E_40GBASE_LR4 = 16,
79+
MLX5E_50GBASE_SR2 = 18,
80+
MLX5E_100GBASE_CR4 = 20,
81+
MLX5E_100GBASE_SR4 = 21,
82+
MLX5E_100GBASE_KR4 = 22,
83+
MLX5E_100GBASE_LR4 = 23,
84+
MLX5E_100BASE_TX = 24,
85+
MLX5E_1000BASE_T = 25,
86+
MLX5E_10GBASE_T = 26,
87+
MLX5E_25GBASE_CR = 27,
88+
MLX5E_25GBASE_KR = 28,
89+
MLX5E_25GBASE_SR = 29,
90+
MLX5E_50GBASE_CR2 = 30,
91+
MLX5E_50GBASE_KR2 = 31,
92+
MLX5E_LINK_MODES_NUMBER,
93+
};
94+
95+
#define MLX5E_PROT_MASK(link_mode) (1 << link_mode)
96+
6497
int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps);
6598
int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys,
6699
int ptys_size, int proto_mask, u8 local_port);

0 commit comments

Comments
 (0)