Received: by 10.213.65.68 with SMTP id h4csp2118501imn; Sun, 8 Apr 2018 20:09:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx49USCgL2jWvyyLXolUIGeWo8wcj4WRrbQuSozKqF1N2mrqdt+jCEcmEA3TuqGfmTMCb9U08 X-Received: by 10.98.15.92 with SMTP id x89mr27903531pfi.7.1523243391906; Sun, 08 Apr 2018 20:09:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243391; cv=none; d=google.com; s=arc-20160816; b=f5lW/wvbyZxQS/MzZ0scEM6oVL0N55EqRyMb9M0M4pDjUNZir/CAVVSVYkDEhruiQe wckApiS2oKYYtJnrQseYy7UNY8x+SWaV0dxR5vMBKR0dh5Pa3ZxCsaSkU6g0r3TzP8ZT IiGWVO4V0UiW61xPyq0wuo1HIAsM24Rug2O/Wa69OdiEycjXC0lEc4J4c7vqh4yh+O0/ xRH67cx/xapyxb1GA8uypBqveotQbwBFEqjn85ZC5umS4oV4+/961bekO+vtFvCv62OS 6XSOueaF79WFus3DDRjyjS5LkfaGZ1zH2aKCLPpTOQqkQA6/Qg4GJUHaasQ4By9azM8x IVJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Ww7WZLg7js92jqhPsD5ejt2LzZ1VFddbmwo260T83RI=; b=gN336EITZTKsnYSOVrLzmQzDw5eJrtLnmZ2r4gx5NvJtkSw49xd589yRPvw2J+t+Vz ECxu80cpfPoh3GlFaE06yIp5rXiMK0WHVxOmAYoRZxIn8Qpy8p7ViyqyRnWQwwV0Q6rR /X2gDXyQOWP8YNH65DOENYTEfNURUKpYov2nYPMAbxQgJGWHpCwbXrMXfDmsmakWUn6D v9bQ481QPGiAG10iEcQ8kAX1FZUjLDdheN6AT0JGpv3nUT/J7+kbzViBSR8C+M+AEKHu uKYmHID7/2r818aRD6FltqaNKwtOjlH+wfOwS+1gFbZkgBK5VGY30UE0F8MkJE9ypyWn uKKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=XwqfVULM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s187si10588953pgb.729.2018.04.08.20.09.15; Sun, 08 Apr 2018 20:09:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=XwqfVULM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932802AbeDIBXH (ORCPT + 99 others); Sun, 8 Apr 2018 21:23:07 -0400 Received: from mail-sn1nam02on0113.outbound.protection.outlook.com ([104.47.36.113]:53303 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932724AbeDIAhD (ORCPT ); Sun, 8 Apr 2018 20:37:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Ww7WZLg7js92jqhPsD5ejt2LzZ1VFddbmwo260T83RI=; b=XwqfVULMerFYh2XIOTgNh6b/z6YLDHU6JisjBJw1sXC5U1efD5HJgKt5TJypBnK/ODjYaGEvrYERDcimrtKcuwRV5uTyI3hKR4oCeGhuKJrQTU9L8cwBRXbbiEt8Cc6lXb7Y2TvOXxfQ14/qfjVTioYSeywFxDnXIYd5cO/xM+Y= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0885.namprd21.prod.outlook.com (52.132.132.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:36:59 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:36:59 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Gal Pressman , Saeed Mahameed , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 076/162] net/mlx5: Fix driver load error flow when firmware is stuck Thread-Topic: [PATCH AUTOSEL for 4.4 076/162] net/mlx5: Fix driver load error flow when firmware is stuck Thread-Index: AQHTz5m0d2GaOHRQ3U2bS0cd9yuidw== Date: Mon, 9 Apr 2018 00:28:39 +0000 Message-ID: <20180409002738.163941-76-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0885;7:ygPnIE/QO5I/0QcZ6/5mCC0MXbzR+SvomeHN7j7ikLHgi+/Lq5KxAl7BOBJOfLEA19EqzmvC49fOD2MaVlj4uMTrKplvB3Zum3q2oOn/PhuOMKZSKAimWWpEFhmqlnw1hpWnEUwxOIW2UlsEtrjvXTq0tMRk4JuyJhIFUT0HH178CkJtT18QOWXRRbePKYTQus1DVIfK/BJN62+j1WDiobzfYxBSN0fu7ZMTGuxZV691HWWCTVxH35e7zwQnkY8p;20:1Pu5BoepWR0tBoPempBaBnPRiuZkrujzy5eYkUKqJOaQiFTIQKoNI9T1QNOahJguhOKdrvGUmqBVArOQP7xduqABWfzVGiIoitZnZ36qdGyA1XnJxoGIbIZ1TApk5jFMnOGlNwL3w1sWKRgkV7gYkTMP6SnsoLCSb25LN4tyUdo= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: c316415e-1396-42bc-35b1-08d59db20120 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0885; x-ms-traffictypediagnostic: DM5PR2101MB0885: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0885;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0885; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(396003)(376002)(39860400002)(366004)(346002)(199004)(189003)(66066001)(3846002)(6116002)(59450400001)(86362001)(305945005)(10290500003)(6436002)(5250100002)(3280700002)(10090500001)(3660700001)(6506007)(2501003)(107886003)(446003)(53936002)(11346002)(2616005)(26005)(76176011)(7736002)(478600001)(476003)(81156014)(25786009)(8676002)(81166006)(186003)(8936002)(4326008)(97736004)(102836004)(99286004)(14454004)(36756003)(6512007)(316002)(2906002)(22452003)(68736007)(54906003)(110136005)(486006)(6486002)(6666003)(5660300001)(2900100001)(1076002)(72206003)(86612001)(105586002)(106356001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0885;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: kqSGtRZMCQtvzkKe7mR4ymIaIJ1/QnZRllaufUvyO3/Uxzt0OkVXcvqZx8umJcIrrLWCQhiUhFoShCb+WlipDzE2ImapvzdAuK8cjGnvDIQp9RIrCQbk2swXXTHQe6P5shjWluRfBdw6c7HEh3E/oJ4WcArW8WKOELldWKKEET8mhRvp2zs2GOKZAn0m+MSVTkJvYGeVqdDA4RbxChpudkN2i5w2c9iFFiCl9b2HQg7fV0Vbul3PT5I1gQzDP8wBTQ/dv8nNxNgymJVLAGw7uEml6nCKJeU4JtXQ1vpeQDpfIZxLP+ZLlQ+NpsAE+ji6O5riE2TKpG6PvingUONhtNLEvkPnU+4cD68kNeexDBMrrvf9MrYnGa+pzULGn3GerBAcyTZYaYBhxCKbWe8BP8SyoUOlzcJWd4FjhRlfXHg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: c316415e-1396-42bc-35b1-08d59db20120 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:28:39.2864 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0885 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gal Pressman [ Upstream commit 8ce59b16b4b6eacedaec1f7b652b4781cdbfe15f ] When wait for firmware init fails, previous code would mistakenly return success and cause inconsistency in the driver state. Fixes: 6c780a0267b8 ("net/mlx5: Wait for FW readiness before initializing c= ommand interface") Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- 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/e= thernet/mellanox/mlx5/core/main.c index f5c1f4acc57b..e9636c0117c7 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -941,7 +941,7 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, str= uct mlx5_priv *priv) if (err) { dev_err(&dev->pdev->dev, "Firmware over %d MS in pre-initializing state,= aborting\n", FW_PRE_INIT_TIMEOUT_MILI); - goto out; + goto out_err; } =20 err =3D mlx5_cmd_init(dev); --=20 2.15.1