]> git.dujemihanovic.xyz Git - linux.git/commit
net/mlx5: Fix cmd error logging for manage pages cmd
authorRoy Novich <royno@nvidia.com>
Wed, 30 Mar 2022 14:59:27 +0000 (17:59 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 22 Aug 2022 19:57:08 +0000 (12:57 -0700)
commit090f3e4f4089ab8041ed7d632c7851c2a42fcc10
tree247ec127c4873bfc2152198e15173b9b2525ed75
parent8e93f29422ffe968d7161f91acdf0d47f5323727
net/mlx5: Fix cmd error logging for manage pages cmd

When the driver unloads, give/reclaim_pages may fail as PF driver in
teardown flow, current code will lead to the following kernel log print
'failed reclaiming pages: err 0'.

Fix it to get same behavior as before the cited commits,
by calling mlx5_cmd_check before handling error state.
mlx5_cmd_check will verify if the returned error is an actual error
needed to be handled by the driver or not and will return an
appropriate value.

Fixes: 8d564292a166 ("net/mlx5: Remove redundant error on reclaim pages")
Fixes: 4dac2f10ada0 ("net/mlx5: Remove redundant notify fail on give pages")
Signed-off-by: Roy Novich <royno@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c