Lines Matching refs:trans_pcie

68 	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);  in iwl_pcie_gen2_tx_stop()  local
76 memset(trans_pcie->queue_stopped, 0, sizeof(trans_pcie->queue_stopped)); in iwl_pcie_gen2_tx_stop()
77 memset(trans_pcie->queue_used, 0, sizeof(trans_pcie->queue_used)); in iwl_pcie_gen2_tx_stop()
80 for (txq_id = 0; txq_id < ARRAY_SIZE(trans_pcie->txq); txq_id++) { in iwl_pcie_gen2_tx_stop()
81 if (!trans_pcie->txq[txq_id]) in iwl_pcie_gen2_tx_stop()
90 static void iwl_pcie_gen2_update_byte_tbl(struct iwl_trans_pcie *trans_pcie, in iwl_pcie_gen2_update_byte_tbl() argument
95 struct iwl_trans *trans = iwl_trans_pcie_get_trans(trans_pcie); in iwl_pcie_gen2_update_byte_tbl()
102 if (trans_pcie->bc_table_dword) in iwl_pcie_gen2_update_byte_tbl()
154 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_pcie_gen2_tfd_unmap() local
160 if (num_tbs > trans_pcie->max_tbs) { in iwl_pcie_gen2_tfd_unmap()
215 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_pcie_gen2_set_tb() local
220 if (le16_to_cpu(tfd->num_tbs) >= trans_pcie->max_tbs) { in iwl_pcie_gen2_set_tb()
222 trans_pcie->max_tbs); in iwl_pcie_gen2_set_tb()
240 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_pcie_gen2_build_amsdu() local
274 page_ptr = (void *)((u8 *)skb->cb + trans_pcie->page_offs); in iwl_pcie_gen2_build_amsdu()
540 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_trans_pcie_gen2_tx() local
542 struct iwl_txq *txq = trans_pcie->txq[txq_id]; in iwl_trans_pcie_gen2_tx()
547 if (WARN_ONCE(!test_bit(txq_id, trans_pcie->queue_used), in iwl_trans_pcie_gen2_tx()
552 skb_shinfo(skb)->nr_frags > IWL_PCIE_MAX_FRAGS(trans_pcie) && in iwl_trans_pcie_gen2_tx()
578 trans_pcie->dev_cmd_offs); in iwl_trans_pcie_gen2_tx()
608 iwl_pcie_gen2_update_byte_tbl(trans_pcie, txq, cmd_len, in iwl_trans_pcie_gen2_tx()
644 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_pcie_gen2_enqueue_hcmd() local
645 struct iwl_txq *txq = trans_pcie->txq[trans_pcie->cmd_queue]; in iwl_pcie_gen2_enqueue_hcmd()
757 cpu_to_le16(QUEUE_TO_SEQ(trans_pcie->cmd_queue) | in iwl_pcie_gen2_enqueue_hcmd()
805 cmd_size, txq->write_ptr, idx, trans_pcie->cmd_queue); in iwl_pcie_gen2_enqueue_hcmd()
861 spin_lock_irqsave(&trans_pcie->reg_lock, flags); in iwl_pcie_gen2_enqueue_hcmd()
863 !trans_pcie->ref_cmd_in_flight) { in iwl_pcie_gen2_enqueue_hcmd()
864 trans_pcie->ref_cmd_in_flight = true; in iwl_pcie_gen2_enqueue_hcmd()
871 spin_unlock_irqrestore(&trans_pcie->reg_lock, flags); in iwl_pcie_gen2_enqueue_hcmd()
886 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_pcie_gen2_send_hcmd_sync() local
888 struct iwl_txq *txq = trans_pcie->txq[trans_pcie->cmd_queue]; in iwl_pcie_gen2_send_hcmd_sync()
901 if (pm_runtime_suspended(&trans_pcie->pci_dev->dev)) { in iwl_pcie_gen2_send_hcmd_sync()
902 ret = wait_event_timeout(trans_pcie->d0i3_waitq, in iwl_pcie_gen2_send_hcmd_sync()
903 pm_runtime_active(&trans_pcie->pci_dev->dev), in iwl_pcie_gen2_send_hcmd_sync()
920 ret = wait_event_timeout(trans_pcie->wait_command_queue, in iwl_pcie_gen2_send_hcmd_sync()
1018 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_pcie_gen2_txq_unmap() local
1019 struct iwl_txq *txq = trans_pcie->txq[txq_id]; in iwl_pcie_gen2_txq_unmap()
1026 if (txq_id != trans_pcie->cmd_queue) { in iwl_pcie_gen2_txq_unmap()
1033 iwl_pcie_free_tso_page(trans_pcie, skb); in iwl_pcie_gen2_txq_unmap()
1041 spin_lock_irqsave(&trans_pcie->reg_lock, flags); in iwl_pcie_gen2_txq_unmap()
1042 if (txq_id != trans_pcie->cmd_queue) { in iwl_pcie_gen2_txq_unmap()
1046 } else if (trans_pcie->ref_cmd_in_flight) { in iwl_pcie_gen2_txq_unmap()
1047 trans_pcie->ref_cmd_in_flight = false; in iwl_pcie_gen2_txq_unmap()
1052 spin_unlock_irqrestore(&trans_pcie->reg_lock, flags); in iwl_pcie_gen2_txq_unmap()
1071 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_pcie_gen2_txq_free_memory() local
1077 trans_pcie->tfd_size * txq->n_window, in iwl_pcie_gen2_txq_free_memory()
1099 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_pcie_gen2_txq_free() local
1100 struct iwl_txq *txq = trans_pcie->txq[txq_id]; in iwl_pcie_gen2_txq_free()
1109 if (txq_id == trans_pcie->cmd_queue) in iwl_pcie_gen2_txq_free()
1118 trans_pcie->txq[txq_id] = NULL; in iwl_pcie_gen2_txq_free()
1120 clear_bit(txq_id, trans_pcie->queue_used); in iwl_pcie_gen2_txq_free()
1128 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_trans_pcie_dyn_txq_alloc() local
1184 if (qid >= ARRAY_SIZE(trans_pcie->txq)) { in iwl_trans_pcie_dyn_txq_alloc()
1190 if (test_and_set_bit(qid, trans_pcie->queue_used)) { in iwl_trans_pcie_dyn_txq_alloc()
1197 trans_pcie->txq[qid] = txq; in iwl_trans_pcie_dyn_txq_alloc()
1219 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_trans_pcie_dyn_txq_free() local
1227 if (!test_and_clear_bit(queue, trans_pcie->queue_used)) { in iwl_trans_pcie_dyn_txq_free()
1240 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_pcie_gen2_tx_free() local
1243 memset(trans_pcie->queue_used, 0, sizeof(trans_pcie->queue_used)); in iwl_pcie_gen2_tx_free()
1246 for (i = 0; i < ARRAY_SIZE(trans_pcie->txq); i++) { in iwl_pcie_gen2_tx_free()
1247 if (!trans_pcie->txq[i]) in iwl_pcie_gen2_tx_free()
1256 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); in iwl_pcie_gen2_tx_init() local
1258 int txq_id = trans_pcie->cmd_queue, ret; in iwl_pcie_gen2_tx_init()
1261 if (!trans_pcie->txq[txq_id]) { in iwl_pcie_gen2_tx_init()
1267 trans_pcie->txq[txq_id] = cmd_queue; in iwl_pcie_gen2_tx_init()
1274 cmd_queue = trans_pcie->txq[txq_id]; in iwl_pcie_gen2_tx_init()
1282 trans_pcie->txq[txq_id]->id = txq_id; in iwl_pcie_gen2_tx_init()
1283 set_bit(txq_id, trans_pcie->queue_used); in iwl_pcie_gen2_tx_init()