Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <noaos@mellanox.com>
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>

authored by

Noa Osherovich and committed by
Leon Romanovsky
8cca30a7 2e353b34

+33 -34
-34
drivers/net/ethernet/mellanox/mlx5/core/en.h
··· 651 651 void *ppriv; 652 652 }; 653 653 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 - 688 654 void mlx5e_build_ptys2ethtool_map(void); 689 655 690 656 void mlx5e_send_nop(struct mlx5e_sq *sq, bool notify_hw);
+33
include/linux/mlx5/port.h
··· 61 61 #define MLX5_I2C_ADDR_HIGH 0x51 62 62 #define MLX5_EEPROM_PAGE_LENGTH 256 63 63 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 + 64 97 int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps); 65 98 int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys, 66 99 int ptys_size, int proto_mask, u8 local_port);