diff options
author | Moshe Shemesh <moshe@nvidia.com> | 2022-03-02 23:37:22 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2022-03-09 13:33:01 -0800 |
commit | 113fdaaad75a02f6de1c9a788be2ee1c27f2324a (patch) | |
tree | 6c2c21c681eb7f217e8022884664e6a949e4e052 /drivers | |
parent | 4dac2f10ada00102b44bb0268d4fc164e84ed78f (diff) |
net/mlx5: Remove redundant error on give pages
If give pages was triggered by FW event and FW failed the command,
the driver should ignore as FW is aware and will handle it.
The downstream patch will add a debugfs counter on this flow for
debuggability.
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c index de150643ef83..cc4734da6171 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c @@ -327,11 +327,12 @@ static void page_notify_fail(struct mlx5_core_dev *dev, u16 func_id, } static int give_pages(struct mlx5_core_dev *dev, u16 func_id, int npages, - int notify_fail, bool ec_function) + int event, bool ec_function) { u32 function = get_function(func_id, ec_function); u32 out[MLX5_ST_SZ_DW(manage_pages_out)] = {0}; int inlen = MLX5_ST_SZ_BYTES(manage_pages_in); + int notify_fail = event; u64 addr; int err; u32 *in; @@ -366,10 +367,15 @@ retry: MLX5_SET(manage_pages_in, in, embedded_cpu_function, ec_function); err = mlx5_cmd_do(dev, in, inlen, out, sizeof(out)); + if (err == -EREMOTEIO) { + notify_fail = 0; + /* if triggered by FW and failed by FW ignore */ + if (event) { + err = 0; + goto out_4k; + } + } if (err) { - if (err == -EREMOTEIO) - notify_fail = 0; - err = mlx5_cmd_check(dev, err, in, out); mlx5_core_warn(dev, "func_id 0x%x, npages %d, err %d\n", func_id, npages, err); |