From patchwork Sun Apr 23 10:07:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 753900 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3w9lYb1qBXz9ryb for ; Sun, 23 Apr 2017 20:08:51 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1044801AbdDWKIr (ORCPT ); Sun, 23 Apr 2017 06:08:47 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:48686 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1044738AbdDWKIM (ORCPT ); Sun, 23 Apr 2017 06:08:12 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from saeedm@mellanox.com) with ESMTPS (AES256-SHA encrypted); 23 Apr 2017 13:08:07 +0300 Received: from sws.mtl.labs.mlnx (reg-l-vrt-045-015.mtl.labs.mlnx [10.135.45.15]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v3NA87Wr011808; Sun, 23 Apr 2017 13:08:07 +0300 From: Saeed Mahameed To: "David S. Miller" Cc: netdev@vger.kernel.org, Mohamad Haj Yahia , Saeed Mahameed , kernel-team@fb.com Subject: [net 1/7] net/mlx5: Fix driver load bad flow when having fw initializing timeout Date: Sun, 23 Apr 2017 13:07:56 +0300 Message-Id: <20170423100802.27630-2-saeedm@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170423100802.27630-1-saeedm@mellanox.com> References: <20170423100802.27630-1-saeedm@mellanox.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Mohamad Haj Yahia If FW is stuck in initializing state we will skip the driver load, but current error handling flow doesn't clean previously allocated command interface resources. Fixes: e3297246c2c8 ('net/mlx5_core: Wait for FW readiness on startup') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Cc: kernel-team@fb.com --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 60154a175bd3..0ad66324247f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -1029,7 +1029,7 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv, if (err) { dev_err(&dev->pdev->dev, "Firmware over %d MS in initializing state, aborting\n", FW_INIT_TIMEOUT_MILI); - goto out_err; + goto err_cmd_cleanup; } err = mlx5_core_enable_hca(dev, 0);