aboutsummaryrefslogtreecommitdiffstats
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 19:51:10 -0400
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 c01abc1d89af..33e812ea7d18 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -802,6 +802,13 @@ struct lro {
802 u8 saw_ts; 802 u8 saw_ts;
803}; 803};
804 804
805/* These flags represent the devices temporary state */
806enum s2io_device_state_t
807{
808 __S2IO_STATE_LINK_TASK=0,
809 __S2IO_STATE_CARD_UP
810};
811
805/* Structure representing one instance of the NIC */ 812/* Structure representing one instance of the NIC */
806struct s2io_nic { 813struct s2io_nic {
807 int rxd_mode; 814 int rxd_mode;
@@ -880,10 +887,6 @@ struct s2io_nic {
880 887
881 int task_flag; 888 int task_flag;
882 unsigned long long start_time; 889 unsigned long long start_time;
883#define CARD_DOWN 1
884#define CARD_UP 2
885 atomic_t card_state;
886 volatile unsigned long link_state;
887 struct vlan_group *vlgrp; 890 struct vlan_group *vlgrp;
888#define MSIX_FLG 0xA5 891#define MSIX_FLG 0xA5
889 struct msix_entry *entries; 892 struct msix_entry *entries;
@@ -906,6 +909,7 @@ struct s2io_nic {
906 unsigned long sending_both; 909 unsigned long sending_both;
907 u8 lro; 910 u8 lro;
908 u16 lro_max_aggr_per_sess; 911 u16 lro_max_aggr_per_sess;
912 volatile unsigned long state;
909 spinlock_t rx_lock; 913 spinlock_t rx_lock;
910 atomic_t isr_cnt; 914 atomic_t isr_cnt;
911 u64 general_int_mask; 915 u64 general_int_mask;