• Alaa Hleihel's avatar
    net/mlx5: Avoid reloading already removed devices · dd80857b
    Alaa Hleihel authored
    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: c5447c70 ("net/mlx5: E-Switch, Reload IB interface when switching devlink modes")
    Signed-off-by: default avatarAlaa Hleihel <alaa@mellanox.com>
    Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
    dd80857b
dev.c 8.7 KB