net/mlx5_core: Add pci error handlers to mlx5_core driver
This patch implement the pci_error_handlers for mlx5_core which allow the driver to recover from PCI error. Once an error is detected in the PCI, the mlx5_pci_err_detected is called and it: 1) Marks the device to be in 'Internal Error' state. 2) Dispatches an event to the mlx5_ib to flush all the outstanding cqes with error. 3) Returns all the on going commands with error. 4) Unloads the driver. Afterwards, the FW is reset and mlx5_pci_slot_reset is called and it enables the device and restore it's pci state. If the later succeeds, mlx5_pci_resume is called, and it loads the SW stack. Signed-off-by:Majd Dibbiny <majd@mellanox.com> Signed-off-by:
Eli Cohen <eli@mellanox.com> Signed-off-by:
Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/net/ethernet/mellanox/mlx5/core/cmd.c 170 additions, 0 deletionsdrivers/net/ethernet/mellanox/mlx5/core/cmd.c
- drivers/net/ethernet/mellanox/mlx5/core/health.c 72 additions, 0 deletionsdrivers/net/ethernet/mellanox/mlx5/core/health.c
- drivers/net/ethernet/mellanox/mlx5/core/main.c 174 additions, 8 deletionsdrivers/net/ethernet/mellanox/mlx5/core/main.c
- drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h 4 additions, 0 deletionsdrivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
- drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c 9 additions, 4 deletionsdrivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
- include/linux/mlx5/driver.h 22 additions, 0 deletionsinclude/linux/mlx5/driver.h
Loading
Please register or sign in to comment