mlxsw: Make MLXSW_SP1_FWREV_MINOR a hard requirement
authorPetr Machata <petrm@mellanox.com>
Sun, 23 Sep 2018 14:48:55 +0000 (17:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:47:15 +0000 (18:47 +0100)
commit1b73ea8377daf651fae6fdaa19a713d08256e2d9
treed793540757c909e97c87e6057f7ea3f9980ff6c0
parent9d2ce0611ad5c2f5327021b7427d6a547b961da3
mlxsw: Make MLXSW_SP1_FWREV_MINOR a hard requirement

[ Upstream commit 12ba7e1045521ec9f251c93ae0a6735cc3f42337 ]

Up until now, mlxsw tolerated firmware versions that weren't exactly
matching the required version, if the branch number matched. That
allowed the users to test various firmware versions as long as they were
on the right branch.

On the other hand, it made it impossible for mlxsw to put a hard lower
bound on a version that fixes all problems known to date. If a user had
a somewhat older FW version installed, mlxsw would start up just fine,
possibly performing non-optimally as it would use features that trigger
problematic behavior.

Therefore tweak the check to accept any FW version that is:

- on the same branch as the preferred version, and
- the same as or newer than the preferred version.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c