The assumption that the first byte in the module mapping dword is the module number shouldn't be hard-coded in the driver, but come from mlx5_ifc structs. While at it, fix the incorrect width for the 'rx_lane' and 'tx_lane' fields.
Showing the changes to include (2 of 3 files). Show all
Unified · Split
| @@ -9888,10 +9888,10 @@ struct mlx5_ifc_pcmr_reg_bits { · 9887 unmodified lines | |||
| 9888 | }; | 9888 | }; |
| 9889 | 9889 | ||
| 9890 | struct mlx5_ifc_lane_2_module_mapping_bits { | 9890 | struct mlx5_ifc_lane_2_module_mapping_bits { |
| 9891 | u8 reserved_at_0[0x6]; | 9891 | u8 reserved_at_0[0x4]; |
| 9892 | u8 rx_lane[0x2]; | 9892 | u8 rx_lane[0x4]; |
| 9893 | u8 reserved_at_8[0x6]; | 9893 | u8 reserved_at_8[0x4]; |
| 9894 | u8 tx_lane[0x2]; | 9894 | u8 tx_lane[0x4]; |
| 9895 | u8 reserved_at_10[0x8]; | 9895 | u8 reserved_at_10[0x8]; |
| 9896 | u8 module[0x8]; | 9896 | u8 module[0x8]; |
| 9897 | }; | 9897 | }; |
| @@ -56,7 +56,6 @@ enum mlx5_an_status { · 55 unmodified lines | |||
| 56 | MLX5_AN_LINK_DOWN = 4, | 56 | MLX5_AN_LINK_DOWN = 4, |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | #define MLX5_EEPROM_IDENTIFIER_BYTE_MASK 0x000000ff | ||
| 60 | #define MLX5_I2C_ADDR_LOW 0x50 | 59 | #define MLX5_I2C_ADDR_LOW 0x50 |
| 61 | #define MLX5_I2C_ADDR_HIGH 0x51 | 60 | #define MLX5_I2C_ADDR_HIGH 0x51 |
| 62 | #define MLX5_EEPROM_PAGE_LENGTH 256 | 61 | #define MLX5_EEPROM_PAGE_LENGTH 256 |