Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75575
b: refs/heads/master
c: 5f490c9
h: refs/heads/master
i:
  75573: 4138f43
  75571: fa02afb
  75567: c2d8d78
v: v3
  • Loading branch information
Sreenivasa Honnur authored and Jeff Garzik committed Jan 18, 2008
1 parent c4be7a4 commit a19e0a9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a49128f0a6edee337174ea341c1d6d7565be350
refs/heads/master: 5f490c9680561e31bf0003693f20e0c7333bbeff
17 changes: 12 additions & 5 deletions trunk/drivers/net/s2io.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
#include "s2io.h"
#include "s2io-regs.h"

#define DRV_VERSION "2.0.26.10"
#define DRV_VERSION "2.0.26.17"

/* S2io Driver name & version. */
static char s2io_driver_name[] = "Neterion";
Expand Down Expand Up @@ -3848,8 +3848,6 @@ static int s2io_open(struct net_device *dev)
netif_carrier_off(dev);
sp->last_link_state = 0;

napi_enable(&sp->napi);

if (sp->config.intr_type == MSI_X) {
int ret = s2io_enable_msi_x(sp);

Expand Down Expand Up @@ -3892,7 +3890,6 @@ static int s2io_open(struct net_device *dev)
return 0;

hw_init_failed:
napi_disable(&sp->napi);
if (sp->config.intr_type == MSI_X) {
if (sp->entries) {
kfree(sp->entries);
Expand Down Expand Up @@ -3932,7 +3929,6 @@ static int s2io_close(struct net_device *dev)
return 0;

netif_stop_queue(dev);
napi_disable(&sp->napi);
/* Reset card, kill tasklet and free Tx and Rx buffers. */
s2io_card_down(sp);

Expand Down Expand Up @@ -6796,6 +6792,8 @@ static void do_s2io_card_down(struct s2io_nic * sp, int do_io)
struct XENA_dev_config __iomem *bar0 = sp->bar0;
unsigned long flags;
register u64 val64 = 0;
struct config_param *config;
config = &sp->config;

if (!is_s2io_card_up(sp))
return;
Expand All @@ -6807,6 +6805,10 @@ static void do_s2io_card_down(struct s2io_nic * sp, int do_io)
}
clear_bit(__S2IO_STATE_CARD_UP, &sp->state);

/* Disable napi */
if (config->napi)
napi_disable(&sp->napi);

/* disable Tx and Rx traffic on the NIC */
if (do_io)
stop_nic(sp);
Expand Down Expand Up @@ -6900,6 +6902,11 @@ static int s2io_card_up(struct s2io_nic * sp)
DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i,
atomic_read(&sp->rx_bufs_left[i]));
}

/* Initialise napi */
if (config->napi)
napi_enable(&sp->napi);

/* Maintain the state prior to the open */
if (sp->promisc_flg)
sp->promisc_flg = 0;
Expand Down

0 comments on commit a19e0a9

Please sign in to comment.