aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4
diff options
context:
space:
mode:
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>2008-12-25 21:14:04 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-25 21:14:04 -0500
commitc03ea21fcf549eed42de7aaa965ced8bee17aa76 (patch)
tree40fa6ddb2baa7ee8715d5f7c4d43549cbc5c9489 /drivers/net/mlx4
parent48374ddce72e278e29080e3177e74a13c034d8b4 (diff)
mlx4_en: Removed redundant cq->armed flag
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4')
-rw-r--r--drivers/net/mlx4/en_cq.c1
-rw-r--r--drivers/net/mlx4/en_tx.c5
-rw-r--r--drivers/net/mlx4/mlx4_en.h1
3 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/mlx4/en_cq.c b/drivers/net/mlx4/en_cq.c
index 1a936f4db2b7..23d54a0e681e 100644
--- a/drivers/net/mlx4/en_cq.c
+++ b/drivers/net/mlx4/en_cq.c
@@ -137,7 +137,6 @@ int mlx4_en_set_cq_moder(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq)
137 137
138int mlx4_en_arm_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq) 138int mlx4_en_arm_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq)
139{ 139{
140 cq->armed = 1;
141 mlx4_cq_arm(&cq->mcq, MLX4_CQ_DB_REQ_NOT, priv->mdev->uar_map, 140 mlx4_cq_arm(&cq->mcq, MLX4_CQ_DB_REQ_NOT, priv->mdev->uar_map,
142 &priv->mdev->uar_lock); 141 &priv->mdev->uar_lock);
143 142
diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c
index 1f25821dccfd..ff4d75205c25 100644
--- a/drivers/net/mlx4/en_tx.c
+++ b/drivers/net/mlx4/en_tx.c
@@ -379,8 +379,8 @@ static void mlx4_en_process_tx_cq(struct net_device *dev, struct mlx4_en_cq *cq)
379 379
380 /* Wakeup Tx queue if this ring stopped it */ 380 /* Wakeup Tx queue if this ring stopped it */
381 if (unlikely(ring->blocked)) { 381 if (unlikely(ring->blocked)) {
382 if (((u32) (ring->prod - ring->cons) <= 382 if ((u32) (ring->prod - ring->cons) <=
383 ring->size - HEADROOM - MAX_DESC_TXBBS) && !cq->armed) { 383 ring->size - HEADROOM - MAX_DESC_TXBBS) {
384 384
385 /* TODO: support multiqueue netdevs. Currently, we block 385 /* TODO: support multiqueue netdevs. Currently, we block
386 * when *any* ring is full. Note that: 386 * when *any* ring is full. Note that:
@@ -404,7 +404,6 @@ void mlx4_en_tx_irq(struct mlx4_cq *mcq)
404 struct mlx4_en_priv *priv = netdev_priv(cq->dev); 404 struct mlx4_en_priv *priv = netdev_priv(cq->dev);
405 struct mlx4_en_tx_ring *ring = &priv->tx_ring[cq->ring]; 405 struct mlx4_en_tx_ring *ring = &priv->tx_ring[cq->ring];
406 406
407 cq->armed = 0;
408 if (!spin_trylock(&ring->comp_lock)) 407 if (!spin_trylock(&ring->comp_lock))
409 return; 408 return;
410 mlx4_en_process_tx_cq(cq->dev, cq); 409 mlx4_en_process_tx_cq(cq->dev, cq);
diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h
index 24f6d2585a6e..e07111521b72 100644
--- a/drivers/net/mlx4/mlx4_en.h
+++ b/drivers/net/mlx4/mlx4_en.h
@@ -311,7 +311,6 @@ struct mlx4_en_cq {
311 enum cq_type is_tx; 311 enum cq_type is_tx;
312 u16 moder_time; 312 u16 moder_time;
313 u16 moder_cnt; 313 u16 moder_cnt;
314 int armed;
315 struct mlx4_cqe *buf; 314 struct mlx4_cqe *buf;
316#define MLX4_EN_OPCODE_ERROR 0x1e 315#define MLX4_EN_OPCODE_ERROR 0x1e
317}; 316};