mlx4_en: Removed redundant cq->armed flag
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>
Fri, 26 Dec 2008 02:14:04 +0000 (18:14 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Dec 2008 02:14:04 +0000 (18:14 -0800)
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mlx4/en_cq.c
drivers/net/mlx4/en_tx.c
drivers/net/mlx4/mlx4_en.h

index 1a936f4db2b7a34ea8d7ce7b1122a8cabcc1a50c..23d54a0e681ed24ce500697de9aadef82f01c6c2 100644 (file)
@@ -137,7 +137,6 @@ int mlx4_en_set_cq_moder(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq)
 
 int mlx4_en_arm_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq)
 {
-       cq->armed = 1;
        mlx4_cq_arm(&cq->mcq, MLX4_CQ_DB_REQ_NOT, priv->mdev->uar_map,
                    &priv->mdev->uar_lock);
 
index 1f25821dccfdfaeba327e676ffda896506415ccc..ff4d75205c25bac5c6acb91fe216320c98fc568b 100644 (file)
@@ -379,8 +379,8 @@ static void mlx4_en_process_tx_cq(struct net_device *dev, struct mlx4_en_cq *cq)
 
        /* Wakeup Tx queue if this ring stopped it */
        if (unlikely(ring->blocked)) {
-               if (((u32) (ring->prod - ring->cons) <=
-                    ring->size - HEADROOM - MAX_DESC_TXBBS) && !cq->armed) {
+               if ((u32) (ring->prod - ring->cons) <=
+                    ring->size - HEADROOM - MAX_DESC_TXBBS) {
 
                        /* TODO: support multiqueue netdevs. Currently, we block
                         * when *any* ring is full. Note that:
@@ -404,7 +404,6 @@ void mlx4_en_tx_irq(struct mlx4_cq *mcq)
        struct mlx4_en_priv *priv = netdev_priv(cq->dev);
        struct mlx4_en_tx_ring *ring = &priv->tx_ring[cq->ring];
 
-       cq->armed = 0;
        if (!spin_trylock(&ring->comp_lock))
                return;
        mlx4_en_process_tx_cq(cq->dev, cq);
index 24f6d2585a6e199a8f87ed6fc7a096918bca68c6..e07111521b72135d63a5f1be188fc7f7a7dd5faf 100644 (file)
@@ -311,7 +311,6 @@ struct mlx4_en_cq {
        enum cq_type is_tx;
        u16 moder_time;
        u16 moder_cnt;
-       int armed;
        struct mlx4_cqe *buf;
 #define MLX4_EN_OPCODE_ERROR   0x1e
 };