From mboxrd@z Thu Jan 1 00:00:00 1970 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 232C1C4332F for ; Sat, 5 Nov 2022 07:10:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229578AbiKEHKu (ORCPT ); Sat, 5 Nov 2022 03:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbiKEHKl (ORCPT ); Sat, 5 Nov 2022 03:10:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 101DA2EF14 for ; Sat, 5 Nov 2022 00:10:41 -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 ADEA0B81649 for ; Sat, 5 Nov 2022 07:10:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FA36C433C1; Sat, 5 Nov 2022 07:10:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667632238; bh=j/IkUxT0bNiaJ6xKi/w6cAeDxSi7neNNh5ho+eQtYOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XIOBFPXfWb3Nr2BH2p0GupBCskIAbhmSEBLON2edCjK+Ycaw49xviupjt5gu8IW6s YwSkvX7kEQhaZdzdCrLAZHLjeVygfK/LbtMN6W0V8AobsjEFT03H906vchzMAxQeB2 09H2TFiGoIEnKfk6s6scBpEiHe4oe+92cXlRLJqk8IPlR39ZDsTzKLr6CWd38sNlS3 M+YxZPeUWWKfJIcP5QgPvhPSKzRYTaB1aWMbZcc48aIx4rr/EuxQMmGvg14Xdb20ez EC8FP+r92hHFZ0ZwBjvYQ529yhiSIl2wuFgGIuaQGjeBHE+GpOSqJ+tjqyBnBdeGMU voe6VSGJgvMwA== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Shay Drory , Moshe Shemesh Subject: [V2 net 04/11] net/mlx5: fw_reset: Don't try to load device in case PCI isn't working Date: Sat, 5 Nov 2022 00:10:21 -0700 Message-Id: <20221105071028.578594-5-saeed@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221105071028.578594-1-saeed@kernel.org> References: <20221105071028.578594-1-saeed@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Shay Drory In case PCI reads fail after unload, there is no use in trying to load the device. Fixes: 5ec697446f46 ("net/mlx5: Add support for devlink reload action fw activate") Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c b/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c index 07c583996c29..9d908a0ccfef 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c @@ -152,7 +152,8 @@ static void mlx5_fw_reset_complete_reload(struct mlx5_core_dev *dev) mlx5_unload_one(dev); if (mlx5_health_wait_pci_up(dev)) mlx5_core_err(dev, "reset reload flow aborted, PCI reads still not working\n"); - mlx5_load_one(dev, false); + else + mlx5_load_one(dev, false); devlink_remote_reload_actions_performed(priv_to_devlink(dev), 0, BIT(DEVLINK_RELOAD_ACTION_DRIVER_REINIT) | BIT(DEVLINK_RELOAD_ACTION_FW_ACTIVATE)); -- 2.38.1