]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Add retry mechanism to the command entry index allocation
authorEran Ben Elisha <eranbe@nvidia.com>
Mon, 31 Aug 2020 12:04:35 +0000 (15:04 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 2 Oct 2020 17:59:55 +0000 (10:59 -0700)
commit79c9232b2cee4d3e1f41ad0e7c2cdbf3d79a454c
treebefc8e8b360dc58eec0f0f84afd436326f15ca00
parent4f7d757ce2768aad3815dc542512220586f919b6
net/mlx5: Add retry mechanism to the command entry index allocation

It is possible that new command entry index allocation will temporarily
fail. The new command holds the semaphore, so it means that a free entry
should be ready soon. Add one second retry mechanism before returning an
error.

Patch "net/mlx5: Avoid possible free of command entry while timeout comp
handler" increase the possibility to bump into this temporarily failure
as it delays the entry index release for non-callback commands.

Fixes: 7c120481afcc ("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: Eran Ben Elisha <eranbe@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c