From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 624CE7E for ; Wed, 2 Nov 2022 03:09:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4FB46C433C1; Wed, 2 Nov 2022 03:09:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1667358573; bh=N6pjIRAHpOp7CkqwnuOZtJ4ze5BKwfga0c+OtAQxIno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FdGNp+xZJFaoJinxfCR+HDTjqv+2iUgxc2q1nI37usejT63fPEUrro4bVcl8WJfoW Yz8fRKhVyaVgMZVSmVk92HhS9w0dynm/hb6y/M79z0NXDE080MqxiqbQhyV9tznfib SPCHDxDLwLHd7lqbNWK8cCpODHCUoUVssDa2ARGQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Roy Novich , Moshe Shemesh , Aya Levin , Saeed Mahameed , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.15 121/132] net/mlx5: Update fw fatal reporter state on PCI handlers successful recover Date: Wed, 2 Nov 2022 03:33:47 +0100 Message-Id: <20221102022102.851598814@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221102022059.593236470@linuxfoundation.org> References: <20221102022059.593236470@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Roy Novich [ Upstream commit 416ef713631937cf5452476a7f1041a3ae7b06c6 ] Update devlink health fw fatal reporter state to "healthy" is needed by strictly calling devlink_health_reporter_state_update() after recovery was done by PCI error handler. This is needed when fw_fatal reporter was triggered due to PCI error. Poll health is called and set reporter state to error. Health recovery failed (since EEH didn't re-enable the PCI). PCI handlers keep on recover flow and succeed later without devlink acknowledgment. Fix this by adding devlink state update at the end of the PCI handler recovery process. Fixes: 6181e5cb752e ("devlink: add support for reporter recovery completion") Signed-off-by: Roy Novich Reviewed-by: Moshe Shemesh Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed Link: https://lore.kernel.org/r/20221026135153.154807-11-saeed@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 1f0156efe255..d092261e96c3 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -1682,6 +1682,10 @@ static void mlx5_pci_resume(struct pci_dev *pdev) err = mlx5_load_one(dev); + if (!err) + devlink_health_reporter_state_update(dev->priv.health.fw_fatal_reporter, + DEVLINK_HEALTH_REPORTER_STATE_HEALTHY); + mlx5_pci_trace(dev, "Done, err = %d, device %s\n", err, !err ? "recovered" : "Failed"); } -- 2.35.1