net/mlx4_core: Add Crdump FW snapshot support
authorAlex Vesker <valex@mellanox.com>
Thu, 12 Jul 2018 12:13:16 +0000 (15:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Jul 2018 00:37:13 +0000 (17:37 -0700)
commitbedc989b0c98285b277ff8a08ff9514e580913f4
treeb43a985053f8be734922974e06ea56854849e61f
parent523f9eb1ef25aab4aaf9aeb5356160e8039411ef
net/mlx4_core: Add Crdump FW snapshot support

Crdump allows the driver to create a snapshot of the FW PCI
crspace and health buffer during a critical FW issue.
In case of a FW command timeout, FW getting stuck or a non zero
value on the catastrophic buffer, a snapshot will be taken.

The snapshot is exposed using devlink, cr-space, fw-health
address regions are registered on init and snapshots are attached
once a new snapshot is collected by the driver.

Signed-off-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/Makefile
drivers/net/ethernet/mellanox/mlx4/catas.c
drivers/net/ethernet/mellanox/mlx4/crdump.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/mlx4.h
include/linux/mlx4/device.h