netdev
[Top] [All Lists]

[PATCH net-drivers-2.6 1/10] e1000: Robert Olsson's fix and refinement t

To: "jgarzik@xxxxxxxxx" <jgarzik@xxxxxxxxx>
Subject: [PATCH net-drivers-2.6 1/10] e1000: Robert Olsson's fix and refinement to the poll routine
From: Malli Chilakala <mallikarjuna.chilakala@xxxxxxxxx>
Date: Tue, 15 Feb 2005 13:24:56 -0800 (PST)
Cc: netdev <netdev@xxxxxxxxxxx>
Replyto: "Malli Chilakala" <mallikarjuna.chilakala@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
1 Robert Olsson's fix and refinement to the poll routine
Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@xxxxxxxxx>
Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@xxxxxxxxx>
Signed-off-by: John Ronciak <john.ronciak@xxxxxxxxx>
diff -up net-drivers-2.6/drivers/net/e1000/e1000_main.c 
net-drivers-2.6/drivers/net/e1000.new/e1000_main.c
--- net-drivers-2.6/drivers/net/e1000/e1000_main.c      2005-02-01 
23:10:24.989105880 -0800
+++ net-drivers-2.6/drivers/net/e1000.new/e1000_main.c  2005-02-01 
23:10:26.709844288 -0800
@@ -2174,24 +2174,21 @@ e1000_clean(struct net_device *netdev, i
        int tx_cleaned;
        int work_done = 0;
        
-       if (!netif_carrier_ok(netdev))
-               goto quit_polling;
-
        tx_cleaned = e1000_clean_tx_irq(adapter);
        e1000_clean_rx_irq(adapter, &work_done, work_to_do);
 
        *budget -= work_done;
        netdev->quota -= work_done;
        
-       /* if no Rx and Tx cleanup work was done, exit the polling mode */
-       if(!tx_cleaned || (work_done < work_to_do) || 
+       /* if no Tx and not enough Rx work done, exit the polling mode */
+       if((!tx_cleaned && (work_done < work_to_do)) || 
                                !netif_running(netdev)) {
-quit_polling:  netif_rx_complete(netdev);
+               netif_rx_complete(netdev);
                e1000_irq_enable(adapter);
                return 0;
        }
 
-       return (work_done >= work_to_do);
+       return 1;
 }
 
 #endif
        




<Prev in Thread] Current Thread [Next in Thread>