mlxsw: reg: Extend MGPIR register with new slot fields
authorVadim Pasternak <vadimp@nvidia.com>
Mon, 11 Apr 2022 14:46:55 +0000 (17:46 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Apr 2022 16:51:39 +0000 (09:51 -0700)
commitb691602c6f96369542d8f9e078610f89af2ad673
treeea01c234b4244a49b616a8672e15c84c0b9aa69b
parent7cb85d3c696ef16405db354c8ef00ea9c666fba8
mlxsw: reg: Extend MGPIR register with new slot fields

Extend MGPIR (Management General Peripheral Information Register) with
new fields specifying the slot number and number of the slots available
on system. The purpose of these fields is:
- to support access to MPGIR register on modular system for getting the
  number of cages, equipped on the line card, inserted at specified
  slot. In case slot number is set zero, MGPIR will provide the
  information for the main board. For Top of the Rack (non-modular)
  system it will provide the same as before.
- to provide the number of slots supported by system. This data is
  relevant only in case slot number is set zero.

Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/core_env.c
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
drivers/net/ethernet/mellanox/mlxsw/reg.h