summaryrefslogtreecommitdiff
path: root/drivers/net/e100.c
diff options
context:
space:
mode:
authorMalli Chilakala <mallikarjuna.chilakala@intel.com>2005-04-29 06:17:42 +0400
committerJeff Garzik <jgarzik@pobox.com>2005-05-13 04:59:28 +0400
commit0236ebb7ae85935b3b96eef7e8a4e203ea9958a0 (patch)
tree040bae76d6b77d5a3ee3a5ba70b0de55df169a5d /drivers/net/e100.c
parent1f53367d5d75ba37f258f6e955d6fc24814051a0 (diff)
downloadlinux-0236ebb7ae85935b3b96eef7e8a4e203ea9958a0.tar.xz
[PATCH] e100: Synchronize interface link state with poll routine
Synchronize interface link state with e100 poll routine Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com> Signed-off-by: Ganesh Venkatesan <ganesh.venkatesan@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
Diffstat (limited to 'drivers/net/e100.c')
-rw-r--r--drivers/net/e100.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 2c8c14ebf205..c1ca2dae7c48 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1743,8 +1743,11 @@ static int e100_up(struct nic *nic)
if((err = request_irq(nic->pdev->irq, e100_intr, SA_SHIRQ,
nic->netdev->name, nic->netdev)))
goto err_no_irq;
- e100_enable_irq(nic);
netif_wake_queue(nic->netdev);
+ netif_poll_enable(nic->netdev);
+ /* enable ints _after_ enabling poll, preventing a race between
+ * disable ints+schedule */
+ e100_enable_irq(nic);
return 0;
err_no_irq:
@@ -1758,11 +1761,13 @@ err_rx_clean_list:
static void e100_down(struct nic *nic)
{
+ /* wait here for poll to complete */
+ netif_poll_disable(nic->netdev);
+ netif_stop_queue(nic->netdev);
e100_hw_reset(nic);
free_irq(nic->pdev->irq, nic->netdev);
del_timer_sync(&nic->watchdog);
netif_carrier_off(nic->netdev);
- netif_stop_queue(nic->netdev);
e100_clean_cbs(nic);
e100_rx_clean_list(nic);
}