]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2020 07:58:42 +0000 (09:58 +0200)
[ Upstream commit 2b8e9c7c3fd0e31091edb1c66cc06ffe4988ca21 ]

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: 610090ebce92 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

index 7f618a443bfd8ba089f4fcadc8867291295fd712..459cd668b9e2fe36d9a30c92450152eb7cba0f3a 100644 (file)
@@ -2161,7 +2161,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;
 }