OSDN Git Service

mlxsw: thermal: Provide optimization for QSFP modules number detection
authorVadim Pasternak <vadimp@mellanox.com>
Sun, 6 Oct 2019 06:34:50 +0000 (09:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 6 Oct 2019 16:31:39 +0000 (18:31 +0200)
commitc5cb92d59b30229e22c286651640f55621586e84
tree69c35c15b77bb683677b892034b0da3edb5f9d55
parentea30a92a4674eab955aee7bb8a017791f0e7d002
mlxsw: thermal: Provide optimization for QSFP modules number detection

Use new field "num_of_modules" of MGPIR register for "thermal" interface
in order to get the number of modules supported by system directly from
the system configuration, instead of getting it from port to module
mapping info.

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c