From patchwork Sun Oct 2 04:56:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 12996748 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E542C433FE for ; Sun, 2 Oct 2022 05:14:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229684AbiJBFOt (ORCPT ); Sun, 2 Oct 2022 01:14:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbiJBFOQ (ORCPT ); Sun, 2 Oct 2022 01:14:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DC2751A28 for ; Sat, 1 Oct 2022 22:14:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BBE21B80CA0 for ; Sun, 2 Oct 2022 05:14:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 526C4C433D7; Sun, 2 Oct 2022 05:14:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664687650; bh=dPy6vqSvkSEcZ6eRO+JfcTj0tEvskAJV2B3nWzeNz+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tHerGJqB95yjsW2iNdbvB5saxEilCVJBm16+dupN55+hTy1Wdo/Jg0aGPXGpLd7W7 ptsj0/nDeuIPQEMRVCO4YdJFMCtSi7K9pbotP3K4FoOo3BeNCpI6uFecgUO8KNAt8m jmdcynRS4zdi/h5fp7WCqtA7Won9yWzUkAnA6PVeEjefGpz36DR10vD+0YgYFzV2h1 aEHGx5GJaXiw5+OBH74+h9AdgxQTeAQmcbV7t3VZWJ2+gjkm6awK/yyLwNw/36i+/c GdvkJs2aYynZBoj5e1ytdlMij8XsFECHFM7ly/Q8JImnpkOHoFgg1kX70OofRvm+VL QudNCcPNK6QjA== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Jianbo Liu , Roi Dayan Subject: [PATCH net-next 15/15] net/mlx5: E-Switch, Return EBUSY if can't get mode lock Date: Sat, 1 Oct 2022 21:56:32 -0700 Message-Id: <20221002045632.291612-16-saeed@kernel.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221002045632.291612-1-saeed@kernel.org> References: <20221002045632.291612-1-saeed@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Jianbo Liu It is to avoid tc retrying during device mode change. Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index 0872a214d2a3..70a7a61f9708 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -4463,7 +4463,7 @@ int mlx5e_configure_flower(struct net_device *dev, struct mlx5e_priv *priv, int err = 0; if (!mlx5_esw_hold(priv->mdev)) - return -EAGAIN; + return -EBUSY; mlx5_esw_get(priv->mdev);