]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net/mlx5: Allow async trigger completion execution on single CPU systems
authorRoy Novich <royno@nvidia.com>
Thu, 3 Nov 2022 06:55:38 +0000 (23:55 -0700)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Dec 2022 12:59:04 +0000 (13:59 +0100)
commit2b246ba2f2cbc6b1bff038eb237af83cdfdb8137
tree88f0ae659de9cf9be299c5be9a4adf841ee4a751
parent14d125cb20b7959e324947232b5d2e09f71dc358
net/mlx5: Allow async trigger completion execution on single CPU systems

[ Upstream commit 2808b37b59288ad8f1897e3546c2296df3384b65 ]

For a single CPU system, the kernel thread executing mlx5_cmd_flush()
never releases the CPU but calls down_trylock(&cmd→sem) in a busy loop.
On a single processor system, this leads to a deadlock as the kernel
thread which executes mlx5_cmd_invoke() never gets scheduled. Fix this,
by adding the cond_resched() call to the loop, allow the command
completion kernel thread to execute.

Fixes: 8e715cd613a1 ("net/mlx5: Set command entry semaphore up once got index free")
Signed-off-by: Alexander Schmidt <alexschm@de.ibm.com>
Signed-off-by: Roy Novich <royno@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit f13e9ebd2925850afa80276b8ab99eeeddc3db98)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c