]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5: E-switch, Destroy TSAR when fail to enable the mode
authorParav Pandit <parav@mellanox.com>
Sat, 27 Jun 2020 10:29:28 +0000 (13:29 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 28 Jul 2020 19:55:27 +0000 (12:55 -0700)
When either esw_legacy_enable() or esw_offloads_enable() fails,
code missed to destroy the created TSAR.

Hence, add the missing call to destroy the TSAR.

Fixes: 1ae01cfb1f7f ("net/mlx5: E-switch, Initialize TSAR Qos hardware block before its user vports")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

index 1116ab9bea6c579069f1e874997d965c7c7bc568..9701f0f8be50bb1f7d276a7b99365e4e6459fe49 100644 (file)
@@ -1608,7 +1608,7 @@ abort:
                mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_IB);
                mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_ETH);
        }
-
+       esw_destroy_tsar(esw);
        return err;
 }