aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r--drivers/net/s2io.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 9d80f1cf73a..f2ba944e035 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -84,7 +84,7 @@
84#include "s2io.h" 84#include "s2io.h"
85#include "s2io-regs.h" 85#include "s2io-regs.h"
86 86
87#define DRV_VERSION "2.0.26.10" 87#define DRV_VERSION "2.0.26.17"
88 88
89/* S2io Driver name & version. */ 89/* S2io Driver name & version. */
90static char s2io_driver_name[] = "Neterion"; 90static char s2io_driver_name[] = "Neterion";
@@ -2704,9 +2704,6 @@ static int s2io_poll(struct napi_struct *napi, int budget)
2704 struct XENA_dev_config __iomem *bar0 = nic->bar0; 2704 struct XENA_dev_config __iomem *bar0 = nic->bar0;
2705 int i; 2705 int i;
2706 2706
2707 if (!is_s2io_card_up(nic))
2708 return 0;
2709
2710 mac_control = &nic->mac_control; 2707 mac_control = &nic->mac_control;
2711 config = &nic->config; 2708 config = &nic->config;
2712 2709
@@ -3851,8 +3848,6 @@ static int s2io_open(struct net_device *dev)
3851 netif_carrier_off(dev); 3848 netif_carrier_off(dev);
3852 sp->last_link_state = 0; 3849 sp->last_link_state = 0;
3853 3850
3854 napi_enable(&sp->napi);
3855
3856 if (sp->config.intr_type == MSI_X) { 3851 if (sp->config.intr_type == MSI_X) {
3857 int ret = s2io_enable_msi_x(sp); 3852 int ret = s2io_enable_msi_x(sp);
3858 3853
@@ -3895,7 +3890,6 @@ static int s2io_open(struct net_device *dev)
3895 return 0; 3890 return 0;
3896 3891
3897hw_init_failed: 3892hw_init_failed:
3898 napi_disable(&sp->napi);
3899 if (sp->config.intr_type == MSI_X) { 3893 if (sp->config.intr_type == MSI_X) {
3900 if (sp->entries) { 3894 if (sp->entries) {
3901 kfree(sp->entries); 3895 kfree(sp->entries);
@@ -3935,7 +3929,6 @@ static int s2io_close(struct net_device *dev)
3935 return 0; 3929 return 0;
3936 3930
3937 netif_stop_queue(dev); 3931 netif_stop_queue(dev);
3938 napi_disable(&sp->napi);
3939 /* Reset card, kill tasklet and free Tx and Rx buffers. */ 3932 /* Reset card, kill tasklet and free Tx and Rx buffers. */
3940 s2io_card_down(sp); 3933 s2io_card_down(sp);
3941 3934
@@ -6799,6 +6792,8 @@ static void do_s2io_card_down(struct s2io_nic * sp, int do_io)
6799 struct XENA_dev_config __iomem *bar0 = sp->bar0; 6792 struct XENA_dev_config __iomem *bar0 = sp->bar0;
6800 unsigned long flags; 6793 unsigned long flags;
6801 register u64 val64 = 0; 6794 register u64 val64 = 0;
6795 struct config_param *config;
6796 config = &sp->config;
6802 6797
6803 if (!is_s2io_card_up(sp)) 6798 if (!is_s2io_card_up(sp))
6804 return; 6799 return;
@@ -6810,6 +6805,10 @@ static void do_s2io_card_down(struct s2io_nic * sp, int do_io)
6810 } 6805 }
6811 clear_bit(__S2IO_STATE_CARD_UP, &sp->state); 6806 clear_bit(__S2IO_STATE_CARD_UP, &sp->state);
6812 6807
6808 /* Disable napi */
6809 if (config->napi)
6810 napi_disable(&sp->napi);
6811
6813 /* disable Tx and Rx traffic on the NIC */ 6812 /* disable Tx and Rx traffic on the NIC */
6814 if (do_io) 6813 if (do_io)
6815 stop_nic(sp); 6814 stop_nic(sp);
@@ -6903,6 +6902,11 @@ static int s2io_card_up(struct s2io_nic * sp)
6903 DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i, 6902 DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i,
6904 atomic_read(&sp->rx_bufs_left[i])); 6903 atomic_read(&sp->rx_bufs_left[i]));
6905 } 6904 }
6905
6906 /* Initialise napi */
6907 if (config->napi)
6908 napi_enable(&sp->napi);
6909
6906 /* Maintain the state prior to the open */ 6910 /* Maintain the state prior to the open */
6907 if (sp->promisc_flg) 6911 if (sp->promisc_flg)
6908 sp->promisc_flg = 0; 6912 sp->promisc_flg = 0;