Lines Matching defs:trans_pcie
86 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
99 txq_id != trans_pcie->txqs.cmd.q_id &&
130 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
134 struct iwl_txq *txq = trans_pcie->txqs.txq[i];
136 if (!test_bit(i, trans_pcie->txqs.queue_used))
170 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
174 tfd = (u8 *)txq->tfds + trans_pcie->txqs.tfd.size * txq->write_ptr;
177 memset(tfd, 0, trans_pcie->txqs.tfd.size);
182 if (num_tbs >= trans_pcie->txqs.tfd.max_tbs) {
184 trans_pcie->txqs.tfd.max_tbs);
199 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
204 spin_lock(&trans_pcie->reg_lock);
206 if (WARN_ON(!trans_pcie->cmd_hold_nic_awake)) {
207 spin_unlock(&trans_pcie->reg_lock);
211 trans_pcie->cmd_hold_nic_awake = false;
214 spin_unlock(&trans_pcie->reg_lock);
234 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
238 page_ptr = (void *)((u8 *)skb->cb + trans_pcie->txqs.page_offs);
298 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
305 if (num_tbs > trans_pcie->txqs.tfd.max_tbs) {
388 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
389 struct iwl_txq *txq = trans_pcie->txqs.txq[txq_id];
402 if (txq_id != trans_pcie->txqs.cmd.q_id) {
416 txq_id == trans_pcie->txqs.cmd.q_id)
443 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
444 struct iwl_txq *txq = trans_pcie->txqs.txq[txq_id];
454 if (txq_id == trans_pcie->txqs.cmd.q_id)
463 trans_pcie->txqs.tfd.size *
485 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
493 memset(trans_pcie->txqs.queue_stopped, 0,
494 sizeof(trans_pcie->txqs.queue_stopped));
495 memset(trans_pcie->txqs.queue_used, 0,
496 sizeof(trans_pcie->txqs.queue_used));
498 trans_pcie->scd_base_addr =
502 scd_base_addr != trans_pcie->scd_base_addr);
505 iwl_trans_write_mem(trans, trans_pcie->scd_base_addr +
510 trans_pcie->txqs.scd_bc_tbls.dma >> 10);
518 iwl_trans_ac_txq_enable(trans, trans_pcie->txqs.cmd.q_id,
519 trans_pcie->txqs.cmd.fifo,
520 trans_pcie->txqs.cmd.wdg_timeout);
544 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
556 struct iwl_txq *txq = trans_pcie->txqs.txq[txq_id];
572 trans_pcie->kw.dma >> 4);
584 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
588 spin_lock_bh(&trans_pcie->irq_lock);
609 spin_unlock_bh(&trans_pcie->irq_lock);
617 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
631 memset(trans_pcie->txqs.queue_stopped, 0,
632 sizeof(trans_pcie->txqs.queue_stopped));
633 memset(trans_pcie->txqs.queue_used, 0,
634 sizeof(trans_pcie->txqs.queue_used));
637 if (!trans_pcie->txq_memory)
656 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
658 memset(trans_pcie->txqs.queue_used, 0,
659 sizeof(trans_pcie->txqs.queue_used));
662 if (trans_pcie->txq_memory) {
667 trans_pcie->txqs.txq[txq_id] = NULL;
671 kfree(trans_pcie->txq_memory);
672 trans_pcie->txq_memory = NULL;
674 iwl_pcie_free_dma_ptr(trans, &trans_pcie->kw);
676 iwl_pcie_free_dma_ptr(trans, &trans_pcie->txqs.scd_bc_tbls);
730 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
743 tfd_sz = trans_pcie->txqs.tfd.size * num_entries;
815 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
825 if (WARN_ON(trans_pcie->txq_memory)) {
830 ret = iwl_pcie_alloc_dma_ptr(trans, &trans_pcie->txqs.scd_bc_tbls,
838 ret = iwl_pcie_alloc_dma_ptr(trans, &trans_pcie->kw, IWL_KW_SIZE);
844 trans_pcie->txq_memory =
847 if (!trans_pcie->txq_memory) {
856 bool cmd_queue = (txq_id == trans_pcie->txqs.cmd.q_id);
864 trans_pcie->txqs.txq[txq_id] = &trans_pcie->txq_memory[txq_id];
865 ret = iwl_pcie_txq_alloc(trans, trans_pcie->txqs.txq[txq_id],
871 trans_pcie->txqs.txq[txq_id]->id = txq_id;
949 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
954 if (!trans_pcie->txq_memory) {
961 spin_lock_bh(&trans_pcie->irq_lock);
968 trans_pcie->kw.dma >> 4);
970 spin_unlock_bh(&trans_pcie->irq_lock);
975 bool cmd_queue = (txq_id == trans_pcie->txqs.cmd.q_id);
983 ret = iwl_txq_init(trans, trans_pcie->txqs.txq[txq_id], slots_num,
997 trans_pcie->txqs.txq[txq_id]->dma_addr >> 8);
1016 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1039 trans_pcie->cmd_hold_nic_awake = true;
1040 spin_unlock(&trans_pcie->reg_lock);
1090 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1091 struct iwl_txq *txq = trans_pcie->txqs.txq[txq_id];
1102 WARN_ONCE(test_bit(txq_id, trans_pcie->txqs.queue_used),
1130 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1137 tbl_dw_addr = trans_pcie->scd_base_addr +
1160 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1161 struct iwl_txq *txq = trans_pcie->txqs.txq[txq_id];
1165 if (test_and_set_bit(txq_id, trans_pcie->txqs.queue_used))
1174 if (txq_id == trans_pcie->txqs.cmd.q_id &&
1175 trans_pcie->scd_set_active)
1182 if (txq_id != trans_pcie->txqs.cmd.q_id)
1236 iwl_trans_write_mem32(trans, trans_pcie->scd_base_addr +
1239 trans_pcie->scd_base_addr +
1252 if (txq_id == trans_pcie->txqs.cmd.q_id &&
1253 trans_pcie->scd_set_active)
1271 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1272 struct iwl_txq *txq = trans_pcie->txqs.txq[txq_id];
1280 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1281 u32 stts_addr = trans_pcie->scd_base_addr +
1285 trans_pcie->txqs.txq[txq_id]->frozen_expiry_remainder = 0;
1286 trans_pcie->txqs.txq[txq_id]->frozen = false;
1294 if (!test_and_clear_bit(txq_id, trans_pcie->txqs.queue_used)) {
1308 trans_pcie->txqs.txq[txq_id]->ampdu = false;
1317 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1321 struct iwl_txq *txq = trans_pcie->txqs.txq[i];
1323 if (i == trans_pcie->txqs.cmd.q_id)
1355 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1356 struct iwl_txq *txq = trans_pcie->txqs.txq[trans_pcie->txqs.cmd.q_id];
1483 cpu_to_le16(QUEUE_TO_SEQ(trans_pcie->txqs.cmd.q_id) |
1491 cpu_to_le16(QUEUE_TO_SEQ(trans_pcie->txqs.cmd.q_id) |
1542 cmd_size, txq->write_ptr, idx, trans_pcie->txqs.cmd.q_id);
1640 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1641 struct iwl_txq *txq = trans_pcie->txqs.txq[trans_pcie->txqs.cmd.q_id];
1646 if (WARN(txq_id != trans_pcie->txqs.cmd.q_id,
1648 txq_id, trans_pcie->txqs.cmd.q_id, sequence, txq->read_ptr,
1678 meta->source->_rx_page_order = trans_pcie->rx_page_order;
1758 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1759 struct iwl_tso_hdr_page *p = this_cpu_ptr(trans_pcie->txqs.tso_hdr_page);
1765 page_ptr = (void *)((u8 *)skb->cb + trans_pcie->txqs.page_offs);
1919 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
1938 trans_pcie->txqs.tfd.size,
2073 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
2084 scd_bc_tbl = trans_pcie->txqs.scd_bc_tbls.addr;
2099 if (trans_pcie->txqs.bc_table_dword)
2117 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
2132 txq = trans_pcie->txqs.txq[txq_id];
2134 if (WARN_ONCE(!test_bit(txq_id, trans_pcie->txqs.queue_used),
2139 skb_shinfo(skb)->nr_frags > IWL_TRANS_PCIE_MAX_FRAGS(trans_pcie) &&
2160 trans_pcie->txqs.dev_cmd_offs);
2243 trans_pcie->txqs.tfd.size,
2318 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
2319 struct iwlagn_scd_bc_tbl *scd_bc_tbl = trans_pcie->txqs.scd_bc_tbls.addr;
2328 if (txq_id != trans_pcie->txqs.cmd.q_id)
2344 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
2345 struct iwl_txq *txq = trans_pcie->txqs.txq[txq_id];
2350 if (WARN_ON(txq_id == trans_pcie->txqs.cmd.q_id))
2367 if (!test_bit(txq_id, trans_pcie->txqs.queue_used)) {
2430 test_bit(txq_id, trans_pcie->txqs.queue_stopped)) {
2459 trans_pcie->txqs.dev_cmd_offs);
2484 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
2485 struct iwl_txq *txq = trans_pcie->txqs.txq[txq_id];
2498 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
2502 struct iwl_txq *txq = trans_pcie->txqs.txq[queue];
2553 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
2555 struct iwl_txq *txq = trans_pcie->txqs.txq[trans_pcie->txqs.cmd.q_id];