]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Allow driver to load with old firmware versions
authorDanielle Ratson <danieller@nvidia.com>
Tue, 23 Nov 2021 07:52:55 +0000 (09:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Nov 2021 11:46:18 +0000 (11:46 +0000)
commit94095e1092600634be57d5b355e9fc7424c49699
tree302854cb7e53209e324ca080b4f3826131b193ed
parent5600d5881a11ecfc58d74b43a088aa47383661d4
mlxsw: spectrum: Allow driver to load with old firmware versions

The driver fails to load with old firmware versions that cannot report
the maximum number of RIF MAC profiles [1].

Fix this by defaulting to a maximum of a single profile in such
situations, as multiple profiles are not supported by old firmware
versions.

[1]
mlxsw_spectrum 0000:03:00.0: cannot register bus device
mlxsw_spectrum: probe of 0000:03:00.0 failed with error -5

Fixes: ca56431d12ace ("mlxsw: spectrum_router: Expose RIF MAC profiles to devlink resource")
Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Reported-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c