]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: core: Prevent QSFP module initialization for old hardware
authorVadim Pasternak <vadimp@mellanox.com>
Sat, 18 May 2019 15:58:28 +0000 (18:58 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 May 2019 20:13:40 +0000 (13:13 -0700)
commit54b1c78ea0372092721b082a659128cabd8a8dcb
treecffa70b715b8591ee1c7b6b362ea942779839f0d
parent717ffe9d0dfb1c7559cd29ee0d15f476f3946e20
mlxsw: core: Prevent QSFP module initialization for old hardware

Old Mellanox silicons, like switchx-2, switch-ib do not support reading
QSFP modules temperature through MTMP register. Attempt to access this
register on systems equipped with the this kind of silicon will cause
initialization flow failure.
Test for hardware resource capability is added in order to distinct
between old and new silicon - old silicons do not have such capability.

Fixes: f01f5bdbdb6d ("mlxsw: core: Extend thermal module with per QSFP module thermal zones")
Fixes: ca0e6eaa2181 ("mlxsw: core: Extend hwmon interface with QSFP module temperature attributes")
Reported-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Vadim Pasternak <vadimp@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.c
drivers/net/ethernet/mellanox/mlxsw/core.h
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c