diff options
author | Noa Osherovich <noaos@mellanox.com> | 2016-06-26 05:43:24 -0400 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2016-08-18 11:49:52 -0400 |
commit | 8cca30a7f914fe363fa9700715619ca5c8cb38cc (patch) | |
tree | 695cc6fba5e610a5307306f28dfc1761cbdb04e9 | |
parent | 2e353b3468ecb1d12a44aaf35888f7de47d5c047 (diff) |
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>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en.h | 34 | ||||
-rw-r--r-- | include/linux/mlx5/port.h | 33 |
2 files changed, 33 insertions, 34 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index 1b495efa7490..61902b147339 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h | |||
@@ -651,40 +651,6 @@ struct mlx5e_priv { | |||
651 | void *ppriv; | 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 | void mlx5e_build_ptys2ethtool_map(void); | 654 | void mlx5e_build_ptys2ethtool_map(void); |
689 | 655 | ||
690 | void mlx5e_send_nop(struct mlx5e_sq *sq, bool notify_hw); | 656 | void mlx5e_send_nop(struct mlx5e_sq *sq, bool notify_hw); |
diff --git a/include/linux/mlx5/port.h b/include/linux/mlx5/port.h index e3012cc64b8a..6f876a4770f6 100644 --- a/include/linux/mlx5/port.h +++ b/include/linux/mlx5/port.h | |||
@@ -61,6 +61,39 @@ enum mlx5_an_status { | |||
61 | #define MLX5_I2C_ADDR_HIGH 0x51 | 61 | #define MLX5_I2C_ADDR_HIGH 0x51 |
62 | #define MLX5_EEPROM_PAGE_LENGTH 256 | 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 | int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps); | 97 | int mlx5_set_port_caps(struct mlx5_core_dev *dev, u8 port_num, u32 caps); |
65 | int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys, | 98 | int mlx5_query_port_ptys(struct mlx5_core_dev *dev, u32 *ptys, |
66 | int ptys_size, int proto_mask, u8 local_port); | 99 | int ptys_size, int proto_mask, u8 local_port); |