]> 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)
commit8f9dd7fe85a4dd579b223e41003ea40f36de52e2
tree2d4d4858da7dcca9d47fef398364747526d39d3c
parentaad8db4b2ddbb2b7cfc17ef2a387dc4f9f5f8f9b
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: ffaf2c1a3989 ("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