From patchwork Sat Mar 2 07:03:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 13579446 X-Patchwork-Delegate: kuba@kernel.org 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 A740912E4A for ; Sat, 2 Mar 2024 07:03:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709363013; cv=none; b=ByVUdjzIAJDwWOIPr9mvRLDMbmTan16q4hnQGWL13fBWY/Co/3MJzwi0Jx3zVsaaXHFDSGV1JS4+5CPLWnlgYmixQcKTK32d50ft03cI/l8vuJ3JEi6lVsyHxv/Qjp4FYKTAcKSfvUJ8y8v/2eOKC9BEipAZxLKJIXv+Of3zh7s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709363013; c=relaxed/simple; bh=PpqABxeDDg9ys4JtXwZkNf2wUeYEgR+GbwRLVDSgfCQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GVN3ll0zDia/pgFmBP4bT08dZxuEZ4bW+6Re1fYNOpdMyQAZ+a5E6PguEEUCDyaqfTwDnMjLnKvMFYcU/efi7/Uanm+HkyNEW0qwsl5dS0Tsfw1kV9k5yBjnnxo+rEUHYEMbAdgJpiNPfmqCKFtG7K7fQgi/POcUSNbSJIVLLUA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=W6D0s1lk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="W6D0s1lk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1772DC43390; Sat, 2 Mar 2024 07:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709363013; bh=PpqABxeDDg9ys4JtXwZkNf2wUeYEgR+GbwRLVDSgfCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W6D0s1lkpIfJzhtedUj4Rx9QhVcw+ytiamRadWBXC27abxwnH0rHzr/XimInVov6R cA5/wiRntBd/uNiB5XVWM9KhTr7hU+iB2jWrSPNLQCtRiFMa3luxEnS+HqitmMtG0B OSWXC3FlBz3efi1UIj61tHrRewo40Dx4dOv3PEh8spgs82qT+gwobRJ73MotKbk6Dj esqPfhoXAOekEdFS4Unln4SqU62oHiyNXt52bM8Ekzq/Gl/R+m6Aq2pF2jSuDery9E EPSklXsaC46d9VxuJDIEedDzhWnNFN5n/OD50/rD3qrAb9pMv4ByjnBVYbMh9jRNtR DkWMRtY890jIA== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Gal Pressman , Leon Romanovsky , Aya Levin , Moshe Shemesh Subject: [net V2 4/9] net/mlx5: Fix fw reporter diagnose output Date: Fri, 1 Mar 2024 23:03:13 -0800 Message-ID: <20240302070318.62997-5-saeed@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240302070318.62997-1-saeed@kernel.org> References: <20240302070318.62997-1-saeed@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Aya Levin Restore fw reporter diagnose to print the syndrome even if it is zero. Following the cited commit, in this case (syndrome == 0) command returns no output at all. This fix restores command output in case syndrome is cleared: $ devlink health diagnose pci/0000:82:00.0 reporter fw Syndrome: 0 Fixes: d17f98bf7cc9 ("net/mlx5: devlink health: use retained error fmsg API") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/health.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c index 8ff6dc9bc803..b5c709bba155 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/health.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c @@ -452,10 +452,10 @@ mlx5_fw_reporter_diagnose(struct devlink_health_reporter *reporter, struct health_buffer __iomem *h = health->health; u8 synd = ioread8(&h->synd); + devlink_fmsg_u8_pair_put(fmsg, "Syndrome", synd); if (!synd) return 0; - devlink_fmsg_u8_pair_put(fmsg, "Syndrome", synd); devlink_fmsg_string_pair_put(fmsg, "Description", hsynd_str(synd)); return 0;