]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Avoid using pending command interface slots
authorMohamad Haj Yahia <mohamad@mellanox.com>
Thu, 23 Feb 2017 09:19:36 +0000 (11:19 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 23 May 2017 13:23:31 +0000 (16:23 +0300)
commitc34ffd2378aa229199cf61ea3b424302116d6e61
tree95b44e558e85cb07532eca3ae3f0644d9ae30f59
parent7dda9c49c3367e396225ae66ee057d8f5e75ba1c
net/mlx5: Avoid using pending command interface slots

Currently when firmware command gets stuck or it takes long time to
complete, the driver command will get timeout and the command slot is
freed and can be used for new commands, and if the firmware receive new
command on the old busy slot its behavior is unexpected and this could
be harmful.
To fix this when the driver command gets timeout we return failure,
but we don't free the command slot and we wait for the firmware to
explicitly respond to that command.
Once all the entries are busy we will stop processing new firmware
commands.

Fixes: 4a781d599d00 ('net/mlx5: Fix potential deadlock in command mode change')
Signed-off-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Cc: kernel-team@fb.com
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
drivers/net/ethernet/mellanox/mlx5/core/eq.c
drivers/net/ethernet/mellanox/mlx5/core/health.c
include/linux/mlx5/driver.h