netdev
[Top] [All Lists]

e1000 close (NAPI)

To: scott.feldman@xxxxxxxxx
Subject: e1000 close (NAPI)
From: Robert Olsson <Robert.Olsson@xxxxxxxxxxx>
Date: Tue, 7 Oct 2003 14:34:37 +0200
Cc: Jeff Garzik <jgarzik@xxxxxxxxx>, Robert Olsson <Robert.Olsson@xxxxxxxxxxx>, netdev@xxxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx

 Hello!


 Here is an patch to check netif_running in dev->poll so we don't have to hang 
in 
 dev_close until all polls are finished.


 Cheers.
                                                --ro


--- drivers/net/e1000/e1000_main.c.031007       2003-05-08 16:29:08.000000000 
+0200
+++ drivers/net/e1000/e1000_main.c      2003-10-07 14:26:12.000000000 +0200
@@ -2040,7 +2040,7 @@
        *budget -= work_done;
        netdev->quota -= work_done;
        
-       if(work_done < work_to_do) {
+       if(work_done < work_to_do || !netif_running(netdev)) {
                netif_rx_complete(netdev);
                e1000_irq_enable(adapter);
        }

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