summaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.h
diff options
context:
space:
mode:
authorSivakumar Subramani <Sivakumar.Subramani@neterion.com>2007-09-06 06:51:14 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:51:10 -0700
commit92b84437a6cddf5dc00ab179e38d2baa2264d46a (patch)
treef59ff1584115efce91c535adc3c8e28dd9099fd5 /drivers/net/s2io.h
parenteaae7f72304f2cd095e68ab39629c0f32815dcf2 (diff)
S2io: Check for device state before handling traffic
- Added check to return from the traffic handling function, if the card status is DOWN. - Implemented Jeff's comments on incorrect return value in s2io_poll function. Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com> Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/s2io.h')
-rw-r--r--drivers/net/s2io.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index c01abc1d89a..33e812ea7d1 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -802,6 +802,13 @@ struct lro {
u8 saw_ts;
};
+/* These flags represent the devices temporary state */
+enum s2io_device_state_t
+{
+ __S2IO_STATE_LINK_TASK=0,
+ __S2IO_STATE_CARD_UP
+};
+
/* Structure representing one instance of the NIC */
struct s2io_nic {
int rxd_mode;
@@ -880,10 +887,6 @@ struct s2io_nic {
int task_flag;
unsigned long long start_time;
-#define CARD_DOWN 1
-#define CARD_UP 2
- atomic_t card_state;
- volatile unsigned long link_state;
struct vlan_group *vlgrp;
#define MSIX_FLG 0xA5
struct msix_entry *entries;
@@ -906,6 +909,7 @@ struct s2io_nic {
unsigned long sending_both;
u8 lro;
u16 lro_max_aggr_per_sess;
+ volatile unsigned long state;
spinlock_t rx_lock;
atomic_t isr_cnt;
u64 general_int_mask;