Lines Matching refs:trans
61 #define IWL_TRANS_FW_DBG_DOMAIN(trans) IWL_FW_INI_DOMAIN_ALWAYS_ON argument
803 struct iwl_trans *trans; member
943 const char *iwl_get_cmd_string(struct iwl_trans *trans, u32 id);
945 void iwl_trans_op_mode_enter(struct iwl_trans *trans,
948 int iwl_trans_start_hw(struct iwl_trans *trans);
950 void iwl_trans_op_mode_leave(struct iwl_trans *trans);
952 void iwl_trans_fw_alive(struct iwl_trans *trans);
954 int iwl_trans_start_fw(struct iwl_trans *trans, const struct iwl_fw *fw,
957 void iwl_trans_stop_device(struct iwl_trans *trans);
959 int iwl_trans_d3_suspend(struct iwl_trans *trans, bool test, bool reset);
961 int iwl_trans_d3_resume(struct iwl_trans *trans, enum iwl_d3_status *status,
965 iwl_trans_dump_data(struct iwl_trans *trans, u32 dump_mask,
970 iwl_trans_alloc_tx_cmd(struct iwl_trans *trans) in iwl_trans_alloc_tx_cmd() argument
972 return kmem_cache_zalloc(trans->dev_cmd_pool, GFP_ATOMIC); in iwl_trans_alloc_tx_cmd()
975 int iwl_trans_send_cmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd);
977 static inline void iwl_trans_free_tx_cmd(struct iwl_trans *trans, in iwl_trans_free_tx_cmd() argument
980 kmem_cache_free(trans->dev_cmd_pool, dev_cmd); in iwl_trans_free_tx_cmd()
983 int iwl_trans_tx(struct iwl_trans *trans, struct sk_buff *skb,
986 void iwl_trans_reclaim(struct iwl_trans *trans, int queue, int ssn,
989 void iwl_trans_set_q_ptrs(struct iwl_trans *trans, int queue, int ptr);
991 void iwl_trans_txq_disable(struct iwl_trans *trans, int queue,
994 bool iwl_trans_txq_enable_cfg(struct iwl_trans *trans, int queue, u16 ssn,
998 int iwl_trans_get_rxq_dma_data(struct iwl_trans *trans, int queue,
1001 void iwl_trans_txq_free(struct iwl_trans *trans, int queue);
1003 int iwl_trans_txq_alloc(struct iwl_trans *trans, u32 flags, u32 sta_mask,
1006 void iwl_trans_txq_set_shared_mode(struct iwl_trans *trans,
1009 static inline void iwl_trans_txq_enable(struct iwl_trans *trans, int queue, in iwl_trans_txq_enable() argument
1022 iwl_trans_txq_enable_cfg(trans, queue, ssn, &cfg, queue_wdg_timeout); in iwl_trans_txq_enable()
1026 void iwl_trans_ac_txq_enable(struct iwl_trans *trans, int queue, int fifo, in iwl_trans_ac_txq_enable() argument
1037 iwl_trans_txq_enable_cfg(trans, queue, 0, &cfg, queue_wdg_timeout); in iwl_trans_ac_txq_enable()
1040 void iwl_trans_freeze_txq_timer(struct iwl_trans *trans,
1043 int iwl_trans_wait_tx_queues_empty(struct iwl_trans *trans, u32 txqs);
1045 int iwl_trans_wait_txq_empty(struct iwl_trans *trans, int queue);
1047 void iwl_trans_write8(struct iwl_trans *trans, u32 ofs, u8 val);
1049 void iwl_trans_write32(struct iwl_trans *trans, u32 ofs, u32 val);
1051 u32 iwl_trans_read32(struct iwl_trans *trans, u32 ofs);
1053 u32 iwl_trans_read_prph(struct iwl_trans *trans, u32 ofs);
1055 void iwl_trans_write_prph(struct iwl_trans *trans, u32 ofs, u32 val);
1057 int iwl_trans_read_mem(struct iwl_trans *trans, u32 addr,
1060 int iwl_trans_read_config32(struct iwl_trans *trans, u32 ofs,
1064 void iwl_trans_debugfs_cleanup(struct iwl_trans *trans);
1067 #define iwl_trans_read_mem_bytes(trans, addr, buf, bufsize) \ argument
1071 iwl_trans_read_mem(trans, addr, buf, \
1075 int iwl_trans_write_imr_mem(struct iwl_trans *trans, u32 dst_addr,
1078 static inline u32 iwl_trans_read_mem32(struct iwl_trans *trans, u32 addr) in iwl_trans_read_mem32() argument
1082 if (iwl_trans_read_mem(trans, addr, &value, 1)) in iwl_trans_read_mem32()
1088 int iwl_trans_write_mem(struct iwl_trans *trans, u32 addr,
1091 static inline u32 iwl_trans_write_mem32(struct iwl_trans *trans, u32 addr, in iwl_trans_write_mem32() argument
1094 return iwl_trans_write_mem(trans, addr, &val, 1); in iwl_trans_write_mem32()
1097 void iwl_trans_set_pmi(struct iwl_trans *trans, bool state);
1099 int iwl_trans_sw_reset(struct iwl_trans *trans, bool retake_ownership);
1101 void iwl_trans_set_bits_mask(struct iwl_trans *trans, u32 reg,
1104 bool _iwl_trans_grab_nic_access(struct iwl_trans *trans);
1106 #define iwl_trans_grab_nic_access(trans) \ argument
1108 likely(_iwl_trans_grab_nic_access(trans)))
1111 iwl_trans_release_nic_access(struct iwl_trans *trans);
1113 static inline void iwl_trans_schedule_reset(struct iwl_trans *trans, in iwl_trans_schedule_reset() argument
1116 if (test_bit(STATUS_TRANS_DEAD, &trans->status)) in iwl_trans_schedule_reset()
1119 if (test_and_set_bit(STATUS_TRANS_RESET_IN_PROGRESS, &trans->status)) in iwl_trans_schedule_reset()
1122 trans->restart.mode.type = type; in iwl_trans_schedule_reset()
1123 trans->restart.mode.context = IWL_ERR_CONTEXT_WORKER; in iwl_trans_schedule_reset()
1125 set_bit(STATUS_RESET_PENDING, &trans->status); in iwl_trans_schedule_reset()
1131 trans->restart.during_reset = test_bit(STATUS_IN_SW_RESET, in iwl_trans_schedule_reset()
1132 &trans->status); in iwl_trans_schedule_reset()
1133 queue_delayed_work(system_unbound_wq, &trans->restart.wk, 0); in iwl_trans_schedule_reset()
1136 static inline void iwl_trans_fw_error(struct iwl_trans *trans, in iwl_trans_fw_error() argument
1139 if (WARN_ON_ONCE(!trans->op_mode)) in iwl_trans_fw_error()
1143 if (!test_and_set_bit(STATUS_FW_ERROR, &trans->status)) { in iwl_trans_fw_error()
1144 trans->state = IWL_TRANS_NO_FW; in iwl_trans_fw_error()
1145 iwl_op_mode_nic_error(trans->op_mode, type); in iwl_trans_fw_error()
1146 iwl_trans_schedule_reset(trans, type); in iwl_trans_fw_error()
1150 static inline void iwl_trans_opmode_sw_reset(struct iwl_trans *trans, in iwl_trans_opmode_sw_reset() argument
1153 if (WARN_ON_ONCE(!trans->op_mode)) in iwl_trans_opmode_sw_reset()
1156 set_bit(STATUS_IN_SW_RESET, &trans->status); in iwl_trans_opmode_sw_reset()
1161 if (!trans->op_mode->ops->sw_reset || in iwl_trans_opmode_sw_reset()
1162 !trans->op_mode->ops->sw_reset(trans->op_mode, type)) in iwl_trans_opmode_sw_reset()
1163 clear_bit(STATUS_IN_SW_RESET, &trans->status); in iwl_trans_opmode_sw_reset()
1166 static inline bool iwl_trans_fw_running(struct iwl_trans *trans) in iwl_trans_fw_running() argument
1168 return trans->state == IWL_TRANS_FW_ALIVE; in iwl_trans_fw_running()
1171 void iwl_trans_sync_nmi(struct iwl_trans *trans);
1173 void iwl_trans_sync_nmi_with_addr(struct iwl_trans *trans, u32 inta_addr,
1176 int iwl_trans_load_pnvm(struct iwl_trans *trans,
1180 void iwl_trans_set_pnvm(struct iwl_trans *trans,
1183 int iwl_trans_load_reduce_power(struct iwl_trans *trans,
1187 void iwl_trans_set_reduce_power(struct iwl_trans *trans,
1190 static inline bool iwl_trans_dbg_ini_valid(struct iwl_trans *trans) in iwl_trans_dbg_ini_valid() argument
1192 return trans->dbg.internal_ini_cfg != IWL_INI_CFG_STATE_NOT_LOADED || in iwl_trans_dbg_ini_valid()
1193 trans->dbg.external_ini_cfg != IWL_INI_CFG_STATE_NOT_LOADED; in iwl_trans_dbg_ini_valid()
1196 void iwl_trans_interrupts(struct iwl_trans *trans, bool enable);
1198 static inline void iwl_trans_finish_sw_reset(struct iwl_trans *trans) in iwl_trans_finish_sw_reset() argument
1200 clear_bit(STATUS_IN_SW_RESET, &trans->status); in iwl_trans_finish_sw_reset()
1209 int iwl_trans_init(struct iwl_trans *trans);
1210 void iwl_trans_free(struct iwl_trans *trans);
1219 static inline u16 iwl_trans_get_num_rbds(struct iwl_trans *trans) in iwl_trans_get_num_rbds() argument
1221 u16 result = trans->cfg->num_rbds; in iwl_trans_get_num_rbds()
1227 if (trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) in iwl_trans_get_num_rbds()
1255 void iwl_trans_pcie_reset(struct iwl_trans *trans, enum iwl_reset_mode mode);
1256 void iwl_trans_pcie_fw_reset_handshake(struct iwl_trans *trans);
1258 int iwl_trans_pcie_send_hcmd(struct iwl_trans *trans,
1262 static inline void iwl_trans_set_info(struct iwl_trans *trans, in iwl_trans_set_info() argument
1267 write = (void *)(uintptr_t)&trans->info; in iwl_trans_set_info()
1271 static inline u16 iwl_trans_get_device_id(struct iwl_trans *trans) in iwl_trans_get_device_id() argument
1273 return u32_get_bits(trans->info.hw_id, GENMASK(31, 16)); in iwl_trans_get_device_id()