]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Avoid processing commands before cmdif is ready
authorEran Ben Elisha <eranbe@mellanox.com>
Thu, 19 Mar 2020 19:43:13 +0000 (21:43 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Sat, 23 May 2020 00:28:38 +0000 (17:28 -0700)
commit874421db372190dde133d6dd8de6e5a293b99c0c
tree2d4d4858da7dcca9d47fef398364747526d39d3c
parent0610a8c6bc9e19364b156131822ae973d03ec84e
net/mlx5: Avoid processing commands before cmdif is ready

When driver is reloading during recovery flow, it can't get new commands
till command interface is up again. Otherwise we may get to null pointer
trying to access non initialized command structures.

Add cmdif state to avoid processing commands while cmdif is not ready.

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