Commit d5cb9d5b authored by Raghavendra Koushik's avatar Raghavendra Koushik Committed by Jeff Garzik

[PATCH] S2io: new functions for card restart

The attached patch incorporates Jeff's comments related to creating
separate functions for restarting the NIC(without using close and
open entry points) and few other comments. Complete list of changes
are as follows:

1. Two new functions s2io_card_down() and s2io_card_up() are defined
and are called during reset procedure instead of close and open
routines.
2. tasklet_status field is now made as unsigned long.
3. On getting serious error, queue is stopped before resetting the card.
4. Removed the check for "queue stopped" in xmit routine.
Signed-off-by: default avatarRaghavendra Koushik <raghavendra.koushik@s2io.com>
Signed-off-by: default avatarRavinandan Arakali <ravinandan.arakali@s2io.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 7deee781
This diff is collapsed.
......@@ -637,7 +637,7 @@ typedef struct s2io_nic {
char name[32];
struct tasklet_struct task;
atomic_t tasklet_status;
volatile unsigned long tasklet_status;
struct timer_list timer;
struct net_device *dev;
struct pci_dev *pdev;
......@@ -730,6 +730,10 @@ typedef struct s2io_nic {
buffAdd_t **ba[MAX_RX_RINGS];
#endif
int task_flag;
#define CARD_DOWN 1
#define CARD_UP 2
atomic_t card_state;
volatile unsigned long link_state;
} nic_t;
#define RESET_ERROR 1;
......@@ -874,5 +878,7 @@ int verify_load_parm(void);
static struct ethtool_ops netdev_ethtool_ops;
#endif
static void s2io_set_link(unsigned long data);
static void s2io_card_down(nic_t * nic);
static int s2io_card_up(nic_t * nic);
#endif /* _S2IO_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment