]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix race between PCI error handlers and health work
authorMohamad Haj Yahia <mohamad@mellanox.com>
Tue, 25 Oct 2016 15:36:33 +0000 (18:36 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Oct 2016 16:00:39 +0000 (12:00 -0400)
commit18ef96b794afb8ed8f1bae1a6ea13fa98801da3b
treee25e0ebfe1a447c0de7a32fea33212457debcb20
parent8e006457e33715712e8fe0b0d88abd2f513a709b
net/mlx5: Fix race between PCI error handlers and health work

Currently there is a race between the health care work and the kernel
pci error handlers because both of them detect the error, the first one
to be called will do the error handling.
There is a chance that health care will disable the pci after resuming
pci slot.
Also create a separate WQ because now we will have two types of health
works, one for the error detection and one for the recovery.

Fixes: c493bfa6edc2 ('net/mlx5_core: Add pci error handlers to mlx5_core driver')
Signed-off-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/health.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/driver.h