]> 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)
commit676a07bc52743ae3eb9159128a0150f65ab75e69
treee25e0ebfe1a447c0de7a32fea33212457debcb20
parente4a9a2c838e672937dfeddaa8869a6922fd3be80
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: 88d54a05851b ('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