diff options
author | hselasky <hselasky@FreeBSD.org> | 2018-03-26 20:36:32 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2018-03-26 20:36:32 +0000 |
commit | 1a9c7a1a25fd6e7d78efede58e852f2baf2c7990 (patch) | |
tree | 94afd3f3209ea4800b037772180c590c951f4f54 /sys/dev/mlx5/driver.h | |
parent | b4052cd108ec94d6594123ba91feda50267e67b7 (diff) | |
download | FreeBSD-src-1a9c7a1a25fd6e7d78efede58e852f2baf2c7990.zip FreeBSD-src-1a9c7a1a25fd6e7d78efede58e852f2baf2c7990.tar.gz |
MFC r330646:
Fix race between PCI error handlers and health work in mlx5core.
linux commit 05ac2c0b7438ea08c5d54b48797acf9b22cb2f6f
Submitted by: Matthew Finlay <matt@mellanox.com>
Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/dev/mlx5/driver.h')
-rw-r--r-- | sys/dev/mlx5/driver.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index 1f6520a..b5cce4a 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -482,7 +482,10 @@ struct mlx5_core_health { u32 prev; int miss_counter; bool sick; + /* wq spinlock to synchronize draining */ + spinlock_t wq_lock; struct workqueue_struct *wq; + unsigned long flags; struct work_struct work; }; @@ -871,6 +874,7 @@ void mlx5_health_cleanup(struct mlx5_core_dev *dev); int mlx5_health_init(struct mlx5_core_dev *dev); void mlx5_start_health_poll(struct mlx5_core_dev *dev); void mlx5_stop_health_poll(struct mlx5_core_dev *dev); +void mlx5_drain_health_wq(struct mlx5_core_dev *dev); #define mlx5_buf_alloc_node(dev, size, direct, buf, node) \ mlx5_buf_alloc(dev, size, direct, buf) |