net/mlx5: Create FW devlink_health_reporter
authorMoshe Shemesh <moshe@mellanox.com>
Tue, 11 Dec 2018 14:09:53 +0000 (16:09 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 13 Jun 2019 20:23:18 +0000 (13:23 -0700)
commit1e34f3efd413a6318c3edd6e8e7e091f1214b2e6
tree82371b17ae48570145ef6e0da6ff890a19edc6c9
parent3e5b72ac2f298423902169db7893fef43365e0a6
net/mlx5: Create FW devlink_health_reporter

Create mlx5_devlink_health_reporter for FW reporter. The FW reporter
implements devlink_health_reporter diagnose callback.

The fw reporter diagnose command can be triggered any time by the user
to check current fw status.
In healthy status, it will return clear syndrome. Otherwise it will
return the syndrome and description of the error type.

Command example and output on healthy status:
$ devlink health diagnose pci/0000:82:00.0 reporter fw
Syndrome: 0

Command example and output on non healthy status:
$ devlink health diagnose pci/0000:82:00.0 reporter fw
Syndrome: 8 Description: unrecoverable hardware error

Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/health.c
include/linux/mlx5/driver.h