diff options
author | Malli Chilakala <mallikarjuna.chilakala@intel.com> | 2005-04-28 22:17:42 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-12 20:59:28 -0400 |
commit | 0236ebb7ae85935b3b96eef7e8a4e203ea9958a0 (patch) | |
tree | 040bae76d6b77d5a3ee3a5ba70b0de55df169a5d /drivers | |
parent | 1f53367d5d75ba37f258f6e955d6fc24814051a0 (diff) |
[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')
-rw-r--r-- | drivers/net/e100.c | 9 |
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) | |||
1743 | if((err = request_irq(nic->pdev->irq, e100_intr, SA_SHIRQ, | 1743 | if((err = request_irq(nic->pdev->irq, e100_intr, SA_SHIRQ, |
1744 | nic->netdev->name, nic->netdev))) | 1744 | nic->netdev->name, nic->netdev))) |
1745 | goto err_no_irq; | 1745 | goto err_no_irq; |
1746 | e100_enable_irq(nic); | ||
1747 | netif_wake_queue(nic->netdev); | 1746 | netif_wake_queue(nic->netdev); |
1747 | netif_poll_enable(nic->netdev); | ||
1748 | /* enable ints _after_ enabling poll, preventing a race between | ||
1749 | * disable ints+schedule */ | ||
1750 | e100_enable_irq(nic); | ||
1748 | return 0; | 1751 | return 0; |
1749 | 1752 | ||
1750 | err_no_irq: | 1753 | err_no_irq: |
@@ -1758,11 +1761,13 @@ err_rx_clean_list: | |||
1758 | 1761 | ||
1759 | static void e100_down(struct nic *nic) | 1762 | static void e100_down(struct nic *nic) |
1760 | { | 1763 | { |
1764 | /* wait here for poll to complete */ | ||
1765 | netif_poll_disable(nic->netdev); | ||
1766 | netif_stop_queue(nic->netdev); | ||
1761 | e100_hw_reset(nic); | 1767 | e100_hw_reset(nic); |
1762 | free_irq(nic->pdev->irq, nic->netdev); | 1768 | free_irq(nic->pdev->irq, nic->netdev); |
1763 | del_timer_sync(&nic->watchdog); | 1769 | del_timer_sync(&nic->watchdog); |
1764 | netif_carrier_off(nic->netdev); | 1770 | netif_carrier_off(nic->netdev); |
1765 | netif_stop_queue(nic->netdev); | ||
1766 | e100_clean_cbs(nic); | 1771 | e100_clean_cbs(nic); |
1767 | e100_rx_clean_list(nic); | 1772 | e100_rx_clean_list(nic); |
1768 | } | 1773 | } |