net/mlx4_en: Process all completions in RX rings after port goes up
[pandora-kernel.git] / drivers / net / ethernet / mellanox / mlx4 / en_netdev.c
index 78d776b..3926b76 100644 (file)
@@ -355,15 +355,11 @@ static void mlx4_en_netpoll(struct net_device *dev)
 {
        struct mlx4_en_priv *priv = netdev_priv(dev);
        struct mlx4_en_cq *cq;
-       unsigned long flags;
        int i;
 
        for (i = 0; i < priv->rx_ring_num; i++) {
                cq = &priv->rx_cq[i];
-               spin_lock_irqsave(&cq->lock, flags);
-               napi_synchronize(&cq->napi);
-               mlx4_en_process_rx_cq(dev, cq, 0);
-               spin_unlock_irqrestore(&cq->lock, flags);
+               napi_schedule(&cq->napi);
        }
 }
 #endif
@@ -688,6 +684,13 @@ int mlx4_en_start_port(struct net_device *dev)
        queue_work(mdev->workqueue, &priv->mcast_task);
 
        priv->port_up = true;
+
+       /* Process all completions if exist to prevent
+        * the queues freezing if they are full
+        */
+       for (i = 0; i < priv->rx_ring_num; i++)
+               napi_schedule(&priv->rx_cq[i].napi);
+
        netif_tx_start_all_queues(dev);
        return 0;