aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-dev.h
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2010-12-03 09:41:48 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-06 16:01:29 -0500
commit22de94de7de78b8de2fb1f2df5aa85b5556cfcfd (patch)
treef965d5f907ffc039ca146c22a5c2e87744cbc604 /drivers/net/wireless/iwlwifi/iwl-dev.h
parentabc471dc31be15f9fee5ec77f25d31b927d334b9 (diff)
iwlwifi: jiffies based tx queues watchdog
This patch replace monitor/recover timer by watchdog based on time stamp. New code allow to discover hangs more precisely. Timeout values are currently doubled monitoring period values of previous timer. This have to be tuned based of firmware timing capabilities. Tested on 3945, 4965, 5300, 6300. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index ea81ced13756..836f1816b110 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -129,9 +129,6 @@ struct iwl_queue {
129 int write_ptr; /* 1-st empty entry (index) host_w*/ 129 int write_ptr; /* 1-st empty entry (index) host_w*/
130 int read_ptr; /* last used entry (index) host_r*/ 130 int read_ptr; /* last used entry (index) host_r*/
131 /* use for monitoring and recovering the stuck queue */ 131 /* use for monitoring and recovering the stuck queue */
132 int last_read_ptr; /* storing the last read_ptr */
133 /* number of time read_ptr and last_read_ptr are the same */
134 u8 repeat_same_read_ptr;
135 dma_addr_t dma_addr; /* physical addr for BD's */ 132 dma_addr_t dma_addr; /* physical addr for BD's */
136 int n_window; /* safe queue window */ 133 int n_window; /* safe queue window */
137 u32 id; 134 u32 id;
@@ -155,6 +152,7 @@ struct iwl_tx_info {
155 * @meta: array of meta data for each command/tx buffer 152 * @meta: array of meta data for each command/tx buffer
156 * @dma_addr_cmd: physical address of cmd/tx buffer array 153 * @dma_addr_cmd: physical address of cmd/tx buffer array
157 * @txb: array of per-TFD driver data 154 * @txb: array of per-TFD driver data
155 * @time_stamp: time (in jiffies) of last read_ptr change
158 * @need_update: indicates need to update read/write index 156 * @need_update: indicates need to update read/write index
159 * @sched_retry: indicates queue is high-throughput aggregation (HT AGG) enabled 157 * @sched_retry: indicates queue is high-throughput aggregation (HT AGG) enabled
160 * 158 *
@@ -170,6 +168,7 @@ struct iwl_tx_queue {
170 struct iwl_device_cmd **cmd; 168 struct iwl_device_cmd **cmd;
171 struct iwl_cmd_meta *meta; 169 struct iwl_cmd_meta *meta;
172 struct iwl_tx_info *txb; 170 struct iwl_tx_info *txb;
171 unsigned long time_stamp;
173 u8 need_update; 172 u8 need_update;
174 u8 sched_retry; 173 u8 sched_retry;
175 u8 active; 174 u8 active;
@@ -1104,11 +1103,10 @@ struct iwl_event_log {
1104#define IWL_DELAY_NEXT_FORCE_RF_RESET (HZ*3) 1103#define IWL_DELAY_NEXT_FORCE_RF_RESET (HZ*3)
1105#define IWL_DELAY_NEXT_FORCE_FW_RELOAD (HZ*5) 1104#define IWL_DELAY_NEXT_FORCE_FW_RELOAD (HZ*5)
1106 1105
1107/* timer constants use to monitor and recover stuck tx queues in mSecs */ 1106/* TX queue watchdog timeouts in mSecs */
1108#define IWL_DEF_MONITORING_PERIOD (1000) 1107#define IWL_DEF_WD_TIMEOUT (2000)
1109#define IWL_LONG_MONITORING_PERIOD (5000) 1108#define IWL_LONG_WD_TIMEOUT (10000)
1110#define IWL_ONE_HUNDRED_MSECS (100) 1109#define IWL_MAX_WD_TIMEOUT (120000)
1111#define IWL_MAX_MONITORING_PERIOD (60000)
1112 1110
1113/* BT Antenna Coupling Threshold (dB) */ 1111/* BT Antenna Coupling Threshold (dB) */
1114#define IWL_BT_ANTENNA_COUPLING_THRESHOLD (35) 1112#define IWL_BT_ANTENNA_COUPLING_THRESHOLD (35)
@@ -1544,7 +1542,7 @@ struct iwl_priv {
1544 struct work_struct run_time_calib_work; 1542 struct work_struct run_time_calib_work;
1545 struct timer_list statistics_periodic; 1543 struct timer_list statistics_periodic;
1546 struct timer_list ucode_trace; 1544 struct timer_list ucode_trace;
1547 struct timer_list monitor_recover; 1545 struct timer_list watchdog;
1548 bool hw_ready; 1546 bool hw_ready;
1549 1547
1550 struct iwl_event_log event_log; 1548 struct iwl_event_log event_log;