Lines Matching refs:txq
78 struct iwl_txq *txq = trans->txqs.txq[trans->txqs.cmd.q_id]; in iwl_pcie_gen2_enqueue_hcmd() local
159 spin_lock_irqsave(&txq->lock, flags); in iwl_pcie_gen2_enqueue_hcmd()
161 idx = iwl_txq_get_cmd_index(txq, txq->write_ptr); in iwl_pcie_gen2_enqueue_hcmd()
162 tfd = iwl_txq_get_tfd(trans, txq, txq->write_ptr); in iwl_pcie_gen2_enqueue_hcmd()
165 if (iwl_txq_space(trans, txq) < ((cmd->flags & CMD_ASYNC) ? 2 : 1)) { in iwl_pcie_gen2_enqueue_hcmd()
166 spin_unlock_irqrestore(&txq->lock, flags); in iwl_pcie_gen2_enqueue_hcmd()
174 out_cmd = txq->entries[idx].cmd; in iwl_pcie_gen2_enqueue_hcmd()
175 out_meta = &txq->entries[idx].meta; in iwl_pcie_gen2_enqueue_hcmd()
191 INDEX_TO_SEQ(txq->write_ptr)); in iwl_pcie_gen2_enqueue_hcmd()
238 cmd_size, txq->write_ptr, idx, trans->txqs.cmd.q_id); in iwl_pcie_gen2_enqueue_hcmd()
242 memcpy(&txq->first_tb_bufs[idx], out_cmd, tb0_size); in iwl_pcie_gen2_enqueue_hcmd()
243 iwl_txq_gen2_set_tb(trans, tfd, iwl_txq_get_first_tb_dma(txq, idx), in iwl_pcie_gen2_enqueue_hcmd()
284 if (WARN_ON_ONCE(txq->entries[idx].free_buf)) in iwl_pcie_gen2_enqueue_hcmd()
285 kfree_sensitive(txq->entries[idx].free_buf); in iwl_pcie_gen2_enqueue_hcmd()
286 txq->entries[idx].free_buf = dup_buf; in iwl_pcie_gen2_enqueue_hcmd()
291 if (txq->read_ptr == txq->write_ptr && txq->wd_timeout) in iwl_pcie_gen2_enqueue_hcmd()
292 mod_timer(&txq->stuck_timer, jiffies + txq->wd_timeout); in iwl_pcie_gen2_enqueue_hcmd()
296 txq->write_ptr = iwl_txq_inc_wrap(trans, txq->write_ptr); in iwl_pcie_gen2_enqueue_hcmd()
297 iwl_txq_inc_wr_ptr(trans, txq); in iwl_pcie_gen2_enqueue_hcmd()
301 spin_unlock_irqrestore(&txq->lock, flags); in iwl_pcie_gen2_enqueue_hcmd()
315 struct iwl_txq *txq = trans->txqs.txq[trans->txqs.cmd.q_id]; in iwl_pcie_gen2_send_hcmd_sync() local
346 txq->read_ptr, txq->write_ptr); in iwl_pcie_gen2_send_hcmd_sync()
387 txq->entries[cmd_idx].meta.flags &= ~CMD_WANT_SKB; in iwl_pcie_gen2_send_hcmd_sync()