Lines Matching refs:fwrt
43 int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,
46 int iwl_fw_dbg_error_collect(struct iwl_fw_runtime *fwrt,
48 int iwl_fw_dbg_ini_collect(struct iwl_fw_runtime *fwrt,
51 int iwl_fw_dbg_collect(struct iwl_fw_runtime *fwrt,
54 int iwl_fw_dbg_collect_trig(struct iwl_fw_runtime *fwrt,
57 int iwl_fw_start_dbg_conf(struct iwl_fw_runtime *fwrt, u8 id);
87 iwl_fw_dbg_trigger_stop_conf_match(struct iwl_fw_runtime *fwrt, in iwl_fw_dbg_trigger_stop_conf_match() argument
91 (fwrt->dump.conf == FW_DBG_INVALID || in iwl_fw_dbg_trigger_stop_conf_match()
92 (BIT(fwrt->dump.conf) & le32_to_cpu(trig->stop_conf_ids)))); in iwl_fw_dbg_trigger_stop_conf_match()
96 iwl_fw_dbg_no_trig_window(struct iwl_fw_runtime *fwrt, u32 id, u32 dis_usec) in iwl_fw_dbg_no_trig_window() argument
101 if (fwrt->dump.non_collect_ts_start[id] && in iwl_fw_dbg_no_trig_window()
102 (time_after(fwrt->dump.non_collect_ts_start[id] + wind_jiff, in iwl_fw_dbg_no_trig_window()
106 fwrt->dump.non_collect_ts_start[id] = jiffies; in iwl_fw_dbg_no_trig_window()
111 iwl_fw_dbg_trigger_check_stop(struct iwl_fw_runtime *fwrt, in iwl_fw_dbg_trigger_check_stop() argument
120 if (iwl_fw_dbg_no_trig_window(fwrt, le32_to_cpu(trig->id), usec)) { in iwl_fw_dbg_trigger_check_stop()
121 IWL_WARN(fwrt, "Trigger %d occurred while no-collect window.\n", in iwl_fw_dbg_trigger_check_stop()
126 return iwl_fw_dbg_trigger_stop_conf_match(fwrt, trig); in iwl_fw_dbg_trigger_check_stop()
130 _iwl_fw_dbg_trigger_on(struct iwl_fw_runtime *fwrt, in _iwl_fw_dbg_trigger_on() argument
136 if (iwl_trans_dbg_ini_valid(fwrt->trans)) in _iwl_fw_dbg_trigger_on()
139 if (!iwl_fw_dbg_trigger_enabled(fwrt->fw, id)) in _iwl_fw_dbg_trigger_on()
142 trig = _iwl_fw_dbg_get_trigger(fwrt->fw, id); in _iwl_fw_dbg_trigger_on()
144 if (!iwl_fw_dbg_trigger_check_stop(fwrt, wdev, trig)) in _iwl_fw_dbg_trigger_on()
150 #define iwl_fw_dbg_trigger_on(fwrt, wdev, id) ({ \ argument
153 _iwl_fw_dbg_trigger_on((fwrt), (wdev), (id)); \
157 _iwl_fw_dbg_trigger_simple_stop(struct iwl_fw_runtime *fwrt, in _iwl_fw_dbg_trigger_simple_stop() argument
164 if (!iwl_fw_dbg_trigger_check_stop(fwrt, wdev, trigger)) in _iwl_fw_dbg_trigger_simple_stop()
167 iwl_fw_dbg_collect_trig(fwrt, trigger, NULL); in _iwl_fw_dbg_trigger_simple_stop()
170 #define iwl_fw_dbg_trigger_simple_stop(fwrt, wdev, trig) \ argument
171 _iwl_fw_dbg_trigger_simple_stop((fwrt), (wdev), \
172 iwl_fw_dbg_get_trigger((fwrt)->fw,\
174 void iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt,
179 static inline void iwl_fw_set_dbg_rec_on(struct iwl_fw_runtime *fwrt) in iwl_fw_set_dbg_rec_on() argument
181 if (fwrt->cur_fw_img == IWL_UCODE_REGULAR && in iwl_fw_set_dbg_rec_on()
182 (fwrt->fw->dbg.dest_tlv || in iwl_fw_set_dbg_rec_on()
183 fwrt->trans->dbg.ini_dest != IWL_FW_INI_LOCATION_INVALID)) in iwl_fw_set_dbg_rec_on()
184 fwrt->trans->dbg.rec_on = true; in iwl_fw_set_dbg_rec_on()
188 static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt) in iwl_fw_dump_conf_clear() argument
190 fwrt->dump.conf = FW_DBG_INVALID; in iwl_fw_dump_conf_clear()
195 static inline bool iwl_fw_dbg_type_on(struct iwl_fw_runtime *fwrt, u32 type) in iwl_fw_dbg_type_on() argument
197 return (fwrt->fw->dbg.dump_mask & BIT(type)); in iwl_fw_dbg_type_on()
200 static inline bool iwl_fw_dbg_is_d3_debug_enabled(struct iwl_fw_runtime *fwrt) in iwl_fw_dbg_is_d3_debug_enabled() argument
202 return fw_has_capa(&fwrt->fw->ucode_capa, in iwl_fw_dbg_is_d3_debug_enabled()
204 fwrt->trans->cfg->d3_debug_data_length && fwrt->ops && in iwl_fw_dbg_is_d3_debug_enabled()
205 fwrt->ops->d3_debug_enable && in iwl_fw_dbg_is_d3_debug_enabled()
206 fwrt->ops->d3_debug_enable(fwrt->ops_ctx) && in iwl_fw_dbg_is_d3_debug_enabled()
207 iwl_fw_dbg_type_on(fwrt, IWL_FW_ERROR_DUMP_D3_DEBUG_DATA); in iwl_fw_dbg_is_d3_debug_enabled()
210 static inline bool iwl_fw_dbg_is_paging_enabled(struct iwl_fw_runtime *fwrt) in iwl_fw_dbg_is_paging_enabled() argument
212 return iwl_fw_dbg_type_on(fwrt, IWL_FW_ERROR_DUMP_PAGING) && in iwl_fw_dbg_is_paging_enabled()
213 !fwrt->trans->trans_cfg->gen2 && in iwl_fw_dbg_is_paging_enabled()
214 fwrt->cur_fw_img < IWL_UCODE_TYPE_MAX && in iwl_fw_dbg_is_paging_enabled()
215 fwrt->fw->img[fwrt->cur_fw_img].paging_mem_size && in iwl_fw_dbg_is_paging_enabled()
216 fwrt->fw_paging_db[0].fw_paging_block; in iwl_fw_dbg_is_paging_enabled()
219 void iwl_fw_dbg_read_d3_debug_data(struct iwl_fw_runtime *fwrt);
221 static inline void iwl_fw_flush_dumps(struct iwl_fw_runtime *fwrt) in iwl_fw_flush_dumps() argument
225 iwl_dbg_tlv_del_timers(fwrt->trans); in iwl_fw_flush_dumps()
227 flush_delayed_work(&fwrt->dump.wks[i].wk); in iwl_fw_flush_dumps()
231 static inline void iwl_fw_cancel_timestamp(struct iwl_fw_runtime *fwrt) in iwl_fw_cancel_timestamp() argument
233 fwrt->timestamp.delay = 0; in iwl_fw_cancel_timestamp()
234 cancel_delayed_work_sync(&fwrt->timestamp.wk); in iwl_fw_cancel_timestamp()
237 void iwl_fw_trigger_timestamp(struct iwl_fw_runtime *fwrt, u32 delay);
239 static inline void iwl_fw_suspend_timestamp(struct iwl_fw_runtime *fwrt) in iwl_fw_suspend_timestamp() argument
241 cancel_delayed_work_sync(&fwrt->timestamp.wk); in iwl_fw_suspend_timestamp()
244 static inline void iwl_fw_resume_timestamp(struct iwl_fw_runtime *fwrt) in iwl_fw_resume_timestamp() argument
246 if (!fwrt->timestamp.delay) in iwl_fw_resume_timestamp()
249 schedule_delayed_work(&fwrt->timestamp.wk, in iwl_fw_resume_timestamp()
250 round_jiffies_relative(fwrt->timestamp.delay)); in iwl_fw_resume_timestamp()
255 static inline void iwl_fw_cancel_timestamp(struct iwl_fw_runtime *fwrt) {} in iwl_fw_cancel_timestamp() argument
257 static inline void iwl_fw_trigger_timestamp(struct iwl_fw_runtime *fwrt, in iwl_fw_trigger_timestamp() argument
260 static inline void iwl_fw_suspend_timestamp(struct iwl_fw_runtime *fwrt) {} in iwl_fw_suspend_timestamp() argument
262 static inline void iwl_fw_resume_timestamp(struct iwl_fw_runtime *fwrt) {} in iwl_fw_resume_timestamp() argument
266 void iwl_fw_dbg_stop_sync(struct iwl_fw_runtime *fwrt);
288 static inline void iwl_fw_error_collect(struct iwl_fw_runtime *fwrt, bool sync) in iwl_fw_error_collect() argument
292 if (!iwl_trans_dbg_ini_valid(fwrt->trans)) { in iwl_fw_error_collect()
293 iwl_fw_dbg_collect_desc(fwrt, &iwl_dump_desc_assert, false, 0); in iwl_fw_error_collect()
297 if (fwrt->trans->dbg.hw_error) { in iwl_fw_error_collect()
299 fwrt->trans->dbg.hw_error = false; in iwl_fw_error_collect()
304 _iwl_dbg_tlv_time_point(fwrt, tp_id, NULL, sync); in iwl_fw_error_collect()
307 void iwl_fw_error_print_fseq_regs(struct iwl_fw_runtime *fwrt);
309 static inline void iwl_fwrt_update_fw_versions(struct iwl_fw_runtime *fwrt, in iwl_fwrt_update_fw_versions() argument
314 fwrt->dump.fw_ver.type = lmac->ver_type; in iwl_fwrt_update_fw_versions()
315 fwrt->dump.fw_ver.subtype = lmac->ver_subtype; in iwl_fwrt_update_fw_versions()
316 fwrt->dump.fw_ver.lmac_major = le32_to_cpu(lmac->ucode_major); in iwl_fwrt_update_fw_versions()
317 fwrt->dump.fw_ver.lmac_minor = le32_to_cpu(lmac->ucode_minor); in iwl_fwrt_update_fw_versions()
321 fwrt->dump.fw_ver.umac_major = le32_to_cpu(umac->umac_major); in iwl_fwrt_update_fw_versions()
322 fwrt->dump.fw_ver.umac_minor = le32_to_cpu(umac->umac_minor); in iwl_fwrt_update_fw_versions()
326 void iwl_fwrt_dump_error_logs(struct iwl_fw_runtime *fwrt);
327 void iwl_send_dbg_dump_complete_cmd(struct iwl_fw_runtime *fwrt,