]> 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)
commited90fef210890bfed36e5289da6b2463f8a9461a
tree302854cb7e53209e324ca080b4f3826131b193ed
parent594f3690838c70a73ae00042564a58476693414b
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: 20d251582f3c2 ("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