提交 113fdaaa 编写于 作者: M Moshe Shemesh 提交者: Saeed Mahameed

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: NMoshe Shemesh <moshe@nvidia.com>
Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
上级 4dac2f10
...@@ -327,11 +327,12 @@ static void page_notify_fail(struct mlx5_core_dev *dev, u16 func_id, ...@@ -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, 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 function = get_function(func_id, ec_function);
u32 out[MLX5_ST_SZ_DW(manage_pages_out)] = {0}; u32 out[MLX5_ST_SZ_DW(manage_pages_out)] = {0};
int inlen = MLX5_ST_SZ_BYTES(manage_pages_in); int inlen = MLX5_ST_SZ_BYTES(manage_pages_in);
int notify_fail = event;
u64 addr; u64 addr;
int err; int err;
u32 *in; u32 *in;
...@@ -366,10 +367,15 @@ static int give_pages(struct mlx5_core_dev *dev, u16 func_id, int npages, ...@@ -366,10 +367,15 @@ static int give_pages(struct mlx5_core_dev *dev, u16 func_id, int npages,
MLX5_SET(manage_pages_in, in, embedded_cpu_function, ec_function); MLX5_SET(manage_pages_in, in, embedded_cpu_function, ec_function);
err = mlx5_cmd_do(dev, in, inlen, out, sizeof(out)); err = mlx5_cmd_do(dev, in, inlen, out, sizeof(out));
if (err) { if (err == -EREMOTEIO) {
if (err == -EREMOTEIO)
notify_fail = 0; notify_fail = 0;
/* if triggered by FW and failed by FW ignore */
if (event) {
err = 0;
goto out_4k;
}
}
if (err) {
err = mlx5_cmd_check(dev, err, in, out); err = mlx5_cmd_check(dev, err, in, out);
mlx5_core_warn(dev, "func_id 0x%x, npages %d, err %d\n", mlx5_core_warn(dev, "func_id 0x%x, npages %d, err %d\n",
func_id, npages, err); func_id, npages, err);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册