mlxsw: minimal: Add validation for FW version
authorVadim Pasternak <vadimp@mellanox.com>
Sun, 6 Oct 2019 06:34:52 +0000 (09:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 6 Oct 2019 16:31:39 +0000 (18:31 +0200)
commit6935af8073a02ffd11a7e495dc318c0a51e18012
treee130e8911218f211732a35b3d73d5446b43e74c4
parent762effaad63edca1d927bd6c98f21b870ee3f2a5
mlxsw: minimal: Add validation for FW version

Add validation for FW version in order to prevent driver initialization
in case FW version is older than expected. FW version validation is
necessary, because use of a new field 'num_of_modules' in MGPIR register
is not backward compatible. FW 'minor' and 'subminor' versions are
expected to be greater than or equal to 2000 and 1886, respectively.

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/minimal.c