Skip to content

Commit ae57467

Browse files
mellanoxbmcdavem330
authored andcommitted
mlxsw: reg: Extend sensor index field size of Management Temperature Register
Extend the size of sensor_index field of MTMP (Management Temperature Register), from 8 to 12 bits due to hardware change. Add define for sensor index for Gear Box (inter-connects) temperature reading. Signed-off-by: Vadim Pasternak <[email protected]> Acked-by: Jiri Pirko <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 961cf99 commit ae57467

File tree

1 file changed

+3
-2
lines changed
  • drivers/net/ethernet/mellanox/mlxsw

1 file changed

+3
-2
lines changed

drivers/net/ethernet/mellanox/mlxsw/reg.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8039,13 +8039,14 @@ MLXSW_ITEM32(reg, mtcap, sensor_count, 0x00, 0, 7);
80398039

80408040
MLXSW_REG_DEFINE(mtmp, MLXSW_REG_MTMP_ID, MLXSW_REG_MTMP_LEN);
80418041

8042+
#define MLXSW_REG_MTMP_GBOX_INDEX_MIN 256
80428043
/* reg_mtmp_sensor_index
80438044
* Sensors index to access.
80448045
* 64-127 of sensor_index are mapped to the SFP+/QSFP modules sequentially
80458046
* (module 0 is mapped to sensor_index 64).
80468047
* Access: Index
80478048
*/
8048-
MLXSW_ITEM32(reg, mtmp, sensor_index, 0x00, 0, 7);
8049+
MLXSW_ITEM32(reg, mtmp, sensor_index, 0x00, 0, 11);
80498050

80508051
/* Convert to milli degrees Celsius */
80518052
#define MLXSW_REG_MTMP_TEMP_TO_MC(val) (val * 125)
@@ -8107,7 +8108,7 @@ MLXSW_ITEM32(reg, mtmp, temperature_threshold_lo, 0x10, 0, 16);
81078108
*/
81088109
MLXSW_ITEM_BUF(reg, mtmp, sensor_name, 0x18, MLXSW_REG_MTMP_SENSOR_NAME_SIZE);
81098110

8110-
static inline void mlxsw_reg_mtmp_pack(char *payload, u8 sensor_index,
8111+
static inline void mlxsw_reg_mtmp_pack(char *payload, u16 sensor_index,
81118112
bool max_temp_enable,
81128113
bool max_temp_reset)
81138114
{

0 commit comments

Comments
 (0)