]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: Avoid reloading already removed devices
authorAlaa Hleihel <alaa@mellanox.com>
Sun, 19 May 2019 08:11:49 +0000 (11:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Jun 2019 06:15:14 +0000 (08:15 +0200)
commit4642a659ab96c4694eca37a080b9709a649cef36
tree344320a5948455cef19301093696efd871743982
parent1b201b63b6470ec86152ae554cfda33839220057
net/mlx5: Avoid reloading already removed devices

Prior to reloading a device we must first verify that it was not already
removed. Otherwise, the attempt to remove the device will do nothing, and
in that case we will end up proceeding with adding an new device that no
one was expecting to remove, leaving behind used resources such as EQs that
causes a failure to destroy comp EQs and syndrome (0x30f433).

Fix that by making sure that we try to remove and add a device (based on a
protocol) only if the device is already added.

Fixes: c5447c70594b ("net/mlx5: E-Switch, Reload IB interface when switching devlink modes")
Signed-off-by: Alaa Hleihel <alaa@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/dev.c