diff options
author | Chris Mason <clm@fb.com> | 2014-04-15 18:09:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-16 15:02:42 -0400 |
commit | c98235cb8584a72e95786e17d695a8e5fafcd766 (patch) | |
tree | 825f91b1a94cc33496d94d00ac20b03e2c1af2e9 /drivers/net | |
parent | b07afe07b10f24c4fd962330be3618ef965a4781 (diff) |
mlx4_en: don't use napi_synchronize inside mlx4_en_netpoll
The mlx4 driver is triggering schedules while atomic inside
mlx4_en_netpoll:
spin_lock_irqsave(&cq->lock, flags);
napi_synchronize(&cq->napi);
^^^^^ msleep here
mlx4_en_process_rx_cq(dev, cq, 0);
spin_unlock_irqrestore(&cq->lock, flags);
This was part of a patch by Alexander Guller from Mellanox in 2011,
but it still isn't upstream.
Signed-off-by: Chris Mason <clm@fb.com>
cc: stable@vger.kernel.org
Acked-By: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_cq.c | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 |
3 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_cq.c b/drivers/net/ethernet/mellanox/mlx4/en_cq.c index 70e95324a97d..c2cd8d31bcad 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_cq.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_cq.c | |||
@@ -66,7 +66,6 @@ int mlx4_en_create_cq(struct mlx4_en_priv *priv, | |||
66 | 66 | ||
67 | cq->ring = ring; | 67 | cq->ring = ring; |
68 | cq->is_tx = mode; | 68 | cq->is_tx = mode; |
69 | spin_lock_init(&cq->lock); | ||
70 | 69 | ||
71 | /* Allocate HW buffers on provided NUMA node. | 70 | /* Allocate HW buffers on provided NUMA node. |
72 | * dev->numa_node is used in mtt range allocation flow. | 71 | * dev->numa_node is used in mtt range allocation flow. |
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index f085c2df5e69..7e4b1720c3d1 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c | |||
@@ -1304,15 +1304,11 @@ static void mlx4_en_netpoll(struct net_device *dev) | |||
1304 | { | 1304 | { |
1305 | struct mlx4_en_priv *priv = netdev_priv(dev); | 1305 | struct mlx4_en_priv *priv = netdev_priv(dev); |
1306 | struct mlx4_en_cq *cq; | 1306 | struct mlx4_en_cq *cq; |
1307 | unsigned long flags; | ||
1308 | int i; | 1307 | int i; |
1309 | 1308 | ||
1310 | for (i = 0; i < priv->rx_ring_num; i++) { | 1309 | for (i = 0; i < priv->rx_ring_num; i++) { |
1311 | cq = priv->rx_cq[i]; | 1310 | cq = priv->rx_cq[i]; |
1312 | spin_lock_irqsave(&cq->lock, flags); | 1311 | napi_schedule(&cq->napi); |
1313 | napi_synchronize(&cq->napi); | ||
1314 | mlx4_en_process_rx_cq(dev, cq, 0); | ||
1315 | spin_unlock_irqrestore(&cq->lock, flags); | ||
1316 | } | 1312 | } |
1317 | } | 1313 | } |
1318 | #endif | 1314 | #endif |
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h index 7a733c287744..04d9b6fe3e80 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | |||
@@ -319,7 +319,6 @@ struct mlx4_en_cq { | |||
319 | struct mlx4_cq mcq; | 319 | struct mlx4_cq mcq; |
320 | struct mlx4_hwq_resources wqres; | 320 | struct mlx4_hwq_resources wqres; |
321 | int ring; | 321 | int ring; |
322 | spinlock_t lock; | ||
323 | struct net_device *dev; | 322 | struct net_device *dev; |
324 | struct napi_struct napi; | 323 | struct napi_struct napi; |
325 | int size; | 324 | int size; |