net/mlx5: Set devlink reload feature bit for supported devices only
authorLeon Romanovsky <leonro@nvidia.com>
Tue, 12 Oct 2021 13:15:25 +0000 (16:15 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 12 Oct 2021 23:29:17 +0000 (16:29 -0700)
commit96869f193cfd26c2b47db32e4d8bcad50461df7a
tree31ec5976c51e1b45d3b179dc5e2d85b5d3f88766
parentbd032e35c568ff7cfa347aa4ddd6491e2453f00c
net/mlx5: Set devlink reload feature bit for supported devices only

Mulitport slave device doesn't support devlink reload, so instead of
complicating initialization flow with devlink_reload_enable() which
will be removed in next patch, don't set DEVLINK_F_RELOAD feature bit
for such devices.

This fixes an error when reload counters exposed (and equal zero) for
the mode that is not supported at all.

Fixes: d89ddaae1766 ("net/mlx5: Disable devlink reload for multi port slave device")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/devlink.c