projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx4_core: Fix deadlock when switching between polling and event fw commands
[cascardo/linux.git]
/
drivers
/
net
/
ethernet
/
mellanox
/
mlx4
/
mlx4.h
diff --git
a/drivers/net/ethernet/mellanox/mlx4/mlx4.h
b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
index
c9d7fc5
..
c128ba3
100644
(file)
--- a/
drivers/net/ethernet/mellanox/mlx4/mlx4.h
+++ b/
drivers/net/ethernet/mellanox/mlx4/mlx4.h
@@
-46,6
+46,7
@@
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <net/devlink.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <net/devlink.h>
+#include <linux/rwsem.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/driver.h>
#include <linux/mlx4/device.h>
#include <linux/mlx4/driver.h>
@@
-627,6
+628,7
@@
struct mlx4_cmd {
struct mutex slave_cmd_mutex;
struct semaphore poll_sem;
struct semaphore event_sem;
struct mutex slave_cmd_mutex;
struct semaphore poll_sem;
struct semaphore event_sem;
+ struct rw_semaphore switch_sem;
int max_cmds;
spinlock_t context_lock;
int free_head;
int max_cmds;
spinlock_t context_lock;
int free_head;