summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/emulex/benet/be.h
diff options
context:
space:
mode:
authorSathya Perla <sathya.perla@emulex.com>2011-11-10 19:18:00 +0000
committerDavid S. Miller <davem@davemloft.net>2011-11-12 17:59:36 -0500
commit6589ade019dcab245d3bb847370f855b56cdf6ad (patch)
treefa23308e00b3cbc50faecc45b98b6133743bf72e /drivers/net/ethernet/emulex/benet/be.h
parent434b3648e9a58600cea5f3a1a0a7a89048e4df61 (diff)
downloadlwn-6589ade019dcab245d3bb847370f855b56cdf6ad.tar.gz
lwn-6589ade019dcab245d3bb847370f855b56cdf6ad.zip
be2net: stop issuing FW cmds if any cmd times out
A FW cmd timeout (with a sufficiently large timeout value in the order of tens of seconds) indicates an unresponsive FW. In this state issuing further cmds and waiting for a completion will only stall the process. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be.h')
-rw-r--r--drivers/net/ethernet/emulex/benet/be.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index 4163980d6bcd..34f162db9f2e 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -350,6 +350,8 @@ struct be_adapter {
u32 beacon_state; /* for set_phys_id */
bool eeh_err;
+ bool ue_detected;
+ bool fw_timeout;
u32 port_num;
bool promiscuous;
bool wol;
@@ -357,7 +359,6 @@ struct be_adapter {
u32 function_caps;
u32 rx_fc; /* Rx flow control */
u32 tx_fc; /* Tx flow control */
- bool ue_detected;
bool stats_cmd_sent;
int link_speed;
u8 port_type;
@@ -522,6 +523,11 @@ static inline bool be_multi_rxq(const struct be_adapter *adapter)
return adapter->num_rx_qs > 1;
}
+static inline bool be_error(struct be_adapter *adapter)
+{
+ return adapter->eeh_err || adapter->ue_detected || adapter->fw_timeout;
+}
+
extern void be_cq_notify(struct be_adapter *adapter, u16 qid, bool arm,
u16 num_popped);
extern void be_link_status_update(struct be_adapter *adapter, u32 link_status);