Commit:     47313054352b879a2bc65379d55b05f48a0af7ec
Parent:     8a32352661cc8e942897d205ba18f871ef7be597
Author:     Herbert Xu <[EMAIL PROTECTED]>
AuthorDate: Tue May 29 15:07:31 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Wed May 30 09:52:48 2007 -0400

    e1000: restore netif_poll_enable call but make sure IRQs are off
    This restores the previously removed netif_poll_enable call in e1000_open.
    It's needed on all but the first call to e1000_open for a NIC as
    e1000_close always calls netif_poll_disable.
    netif_poll_enable can only be called safely if no polls have been
    scheduled.  This should be the case as long as we don't enter our IRQ
    In order to guarantee this we explicitly disable IRQs as early as possible
    when we're probing the NIC.
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
    Cc: "Kok, Auke" <[EMAIL PROTECTED]>
    Cc: Jeff Garzik <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
 drivers/net/e1000/e1000_main.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index cbc7feb..9ec35b7 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -1325,7 +1325,10 @@ e1000_sw_init(struct e1000_adapter *adapter)
-       atomic_set(&adapter->irq_sem, 1);
+       /* Explicitly disable IRQ since the NIC can be in any state. */
+       atomic_set(&adapter->irq_sem, 0);
+       e1000_irq_disable(adapter);
        set_bit(__E1000_DOWN, &adapter->flags);
@@ -1431,6 +1434,10 @@ e1000_open(struct net_device *netdev)
        /* From here on the code is the same as e1000_up() */
        clear_bit(__E1000_DOWN, &adapter->flags);
+#ifdef CONFIG_E1000_NAPI
+       netif_poll_enable(netdev);
        /* fire a link status change interrupt to start the watchdog */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to