[NET]: Make ->poll() breakout consistent in Intel ethernet drivers.
[firefly-linux-kernel-4.4.55.git] / drivers / net / e1000e / netdev.c
index dd9698cfbb9d92d7b8229ed95c0b15959c3782ce..4a6fc745377637e85a5784524bd7da58106cd7e5 100644 (file)
@@ -1384,7 +1384,7 @@ static int e1000_clean(struct napi_struct *napi, int budget)
 {
        struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi);
        struct net_device *poll_dev = adapter->netdev;
-       int tx_cleaned = 0, work_done = 0;
+       int work_done = 0;
 
        /* Must NOT use netdev_priv macro here. */
        adapter = poll_dev->priv;
@@ -1394,14 +1394,14 @@ static int e1000_clean(struct napi_struct *napi, int budget)
         * simultaneously.  A failure obtaining the lock means
         * tx_ring is currently being cleaned anyway. */
        if (spin_trylock(&adapter->tx_queue_lock)) {
-               tx_cleaned = e1000_clean_tx_irq(adapter);
+               e1000_clean_tx_irq(adapter);
                spin_unlock(&adapter->tx_queue_lock);
        }
 
        adapter->clean_rx(adapter, &work_done, budget);
 
-       /* If no Tx and not enough Rx work done, exit the polling mode */
-       if ((!tx_cleaned && (work_done < budget))) {
+       /* If budget not fully consumed, exit the polling mode */
+       if (work_done < budget) {
                if (adapter->itr_setting & 3)
                        e1000_set_itr(adapter);
                netif_rx_complete(poll_dev, napi);