From patchwork Mon Aug 3 12:18:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 266788 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94792C433E0 for ; Mon, 3 Aug 2020 12:54:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A49B2064B for ; Mon, 3 Aug 2020 12:54:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596459274; bh=cvlvYo3ykJWo/eJMCsACqdBwP1EY8RA4Tjm7oKyDdRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=vc6WysHL0QCV5O6ac+MsstkjQNW29O5dYFIJPYVA9F/vjL+JQW8FLn1LzcOWIVDMo bUXjrTwAhWt7KT4gwsQN/jswwulq0NMM5ZNdbJ+ev/6gEd98d8IgLNhcGOmqeCc0jf lr0D4c/NTgtPfWqMbfeh2oULvGwjwYLRFlmIb0Jg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728269AbgHCMye (ORCPT ); Mon, 3 Aug 2020 08:54:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:47466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727845AbgHCMXY (ORCPT ); Mon, 3 Aug 2020 08:23:24 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2C6A020738; Mon, 3 Aug 2020 12:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596457403; bh=cvlvYo3ykJWo/eJMCsACqdBwP1EY8RA4Tjm7oKyDdRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jgXdccfLQT4r5o0xkj6FV1W6rj5LZ+JQfpv6C7+UtXI3LhDuZV10Za+vL1J+7E/4d 8GoopP2Flu1jSoHeGBLoQRtdOw1oDgOfB7MOUN12vn7xgISWxSribp22XEjZFDe/tD t8sxkH5etBTh2nixnDx0krLsatICgAza3XsJ+ESs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Parav Pandit , Roi Dayan , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.7 054/120] net/mlx5: E-switch, Destroy TSAR when fail to enable the mode Date: Mon, 3 Aug 2020 14:18:32 +0200 Message-Id: <20200803121905.427161628@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200803121902.860751811@linuxfoundation.org> References: <20200803121902.860751811@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Parav Pandit [ 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 Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c index 7f618a443bfd8..459cd668b9e2f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c @@ -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; }