Lines Matching refs:txq
364 il->txq[il->cmd_queue].meta[cmd_idx].flags &= ~CMD_WANT_SKB; in il_send_cmd_sync()
2707 il_txq_update_write_ptr(struct il_priv *il, struct il_tx_queue *txq) in il_txq_update_write_ptr() argument
2710 int txq_id = txq->q.id; in il_txq_update_write_ptr()
2712 if (txq->need_update == 0) in il_txq_update_write_ptr()
2730 il_wr(il, HBUS_TARG_WRPTR, txq->q.write_ptr | (txq_id << 8)); in il_txq_update_write_ptr()
2738 _il_wr(il, HBUS_TARG_WRPTR, txq->q.write_ptr | (txq_id << 8)); in il_txq_update_write_ptr()
2739 txq->need_update = 0; in il_txq_update_write_ptr()
2749 struct il_tx_queue *txq = &il->txq[txq_id]; in il_tx_queue_unmap() local
2750 struct il_queue *q = &txq->q; in il_tx_queue_unmap()
2756 il->ops->txq_free_tfd(il, txq); in il_tx_queue_unmap()
2773 struct il_tx_queue *txq = &il->txq[txq_id]; in il_tx_queue_free() local
2780 if (txq->cmd) { in il_tx_queue_free()
2782 kfree(txq->cmd[i]); in il_tx_queue_free()
2786 if (txq->q.n_bd) in il_tx_queue_free()
2787 dma_free_coherent(dev, il->hw_params.tfd_size * txq->q.n_bd, in il_tx_queue_free()
2788 txq->tfds, txq->q.dma_addr); in il_tx_queue_free()
2791 kfree(txq->skbs); in il_tx_queue_free()
2792 txq->skbs = NULL; in il_tx_queue_free()
2795 kfree(txq->cmd); in il_tx_queue_free()
2796 kfree(txq->meta); in il_tx_queue_free()
2797 txq->cmd = NULL; in il_tx_queue_free()
2798 txq->meta = NULL; in il_tx_queue_free()
2801 memset(txq, 0, sizeof(*txq)); in il_tx_queue_free()
2811 struct il_tx_queue *txq = &il->txq[il->cmd_queue]; in il_cmd_queue_unmap() local
2812 struct il_queue *q = &txq->q; in il_cmd_queue_unmap()
2821 if (txq->meta[i].flags & CMD_MAPPED) { in il_cmd_queue_unmap()
2823 dma_unmap_addr(&txq->meta[i], mapping), in il_cmd_queue_unmap()
2824 dma_unmap_len(&txq->meta[i], len), in il_cmd_queue_unmap()
2826 txq->meta[i].flags = 0; in il_cmd_queue_unmap()
2833 if (txq->meta[i].flags & CMD_MAPPED) { in il_cmd_queue_unmap()
2835 dma_unmap_addr(&txq->meta[i], mapping), in il_cmd_queue_unmap()
2836 dma_unmap_len(&txq->meta[i], len), in il_cmd_queue_unmap()
2838 txq->meta[i].flags = 0; in il_cmd_queue_unmap()
2853 struct il_tx_queue *txq = &il->txq[il->cmd_queue]; in il_cmd_queue_free() local
2860 if (txq->cmd) { in il_cmd_queue_free()
2862 kfree(txq->cmd[i]); in il_cmd_queue_free()
2866 if (txq->q.n_bd) in il_cmd_queue_free()
2867 dma_free_coherent(dev, il->hw_params.tfd_size * txq->q.n_bd, in il_cmd_queue_free()
2868 txq->tfds, txq->q.dma_addr); in il_cmd_queue_free()
2871 kfree(txq->cmd); in il_cmd_queue_free()
2872 kfree(txq->meta); in il_cmd_queue_free()
2873 txq->cmd = NULL; in il_cmd_queue_free()
2874 txq->meta = NULL; in il_cmd_queue_free()
2877 memset(txq, 0, sizeof(*txq)); in il_cmd_queue_free()
2961 il_tx_queue_alloc(struct il_priv *il, struct il_tx_queue *txq, u32 id) in il_tx_queue_alloc() argument
2969 txq->skbs = kcalloc(TFD_QUEUE_SIZE_MAX, in il_tx_queue_alloc()
2972 if (!txq->skbs) { in il_tx_queue_alloc()
2977 txq->skbs = NULL; in il_tx_queue_alloc()
2981 txq->tfds = in il_tx_queue_alloc()
2982 dma_alloc_coherent(dev, tfd_sz, &txq->q.dma_addr, GFP_KERNEL); in il_tx_queue_alloc()
2983 if (!txq->tfds) in il_tx_queue_alloc()
2986 txq->q.id = id; in il_tx_queue_alloc()
2991 kfree(txq->skbs); in il_tx_queue_alloc()
2992 txq->skbs = NULL; in il_tx_queue_alloc()
3005 struct il_tx_queue *txq = &il->txq[txq_id]; in il_tx_queue_init() local
3023 txq->meta = in il_tx_queue_init()
3025 txq->cmd = in il_tx_queue_init()
3028 if (!txq->meta || !txq->cmd) in il_tx_queue_init()
3037 txq->cmd[i] = kmalloc(len, GFP_KERNEL); in il_tx_queue_init()
3038 if (!txq->cmd[i]) in il_tx_queue_init()
3043 ret = il_tx_queue_alloc(il, txq, txq_id); in il_tx_queue_init()
3047 txq->need_update = 0; in il_tx_queue_init()
3055 il_set_swq_id(txq, txq_id, txq_id); in il_tx_queue_init()
3058 il_queue_init(il, &txq->q, slots, txq_id); in il_tx_queue_init()
3061 il->ops->txq_init(il, txq); in il_tx_queue_init()
3066 kfree(txq->cmd[i]); in il_tx_queue_init()
3068 kfree(txq->meta); in il_tx_queue_init()
3069 txq->meta = NULL; in il_tx_queue_init()
3070 kfree(txq->cmd); in il_tx_queue_init()
3071 txq->cmd = NULL; in il_tx_queue_init()
3081 struct il_tx_queue *txq = &il->txq[txq_id]; in il_tx_queue_reset() local
3091 memset(txq->meta, 0, sizeof(struct il_cmd_meta) * actual_slots); in il_tx_queue_reset()
3092 txq->need_update = 0; in il_tx_queue_reset()
3095 il_queue_init(il, &txq->q, slots, txq_id); in il_tx_queue_reset()
3098 il->ops->txq_init(il, txq); in il_tx_queue_reset()
3116 struct il_tx_queue *txq = &il->txq[il->cmd_queue]; in il_enqueue_hcmd() local
3117 struct il_queue *q = &txq->q; in il_enqueue_hcmd()
3154 out_cmd = txq->cmd[idx]; in il_enqueue_hcmd()
3155 out_meta = &txq->meta[idx]; in il_enqueue_hcmd()
3209 txq->need_update = 1; in il_enqueue_hcmd()
3213 il->ops->txq_update_byte_cnt_tbl(il, txq, 0); in il_enqueue_hcmd()
3215 il->ops->txq_attach_buf_to_tfd(il, txq, phys_addr, fix_size, 1, in il_enqueue_hcmd()
3220 il_txq_update_write_ptr(il, txq); in il_enqueue_hcmd()
3237 struct il_tx_queue *txq = &il->txq[txq_id]; in il_hcmd_queue_reclaim() local
3238 struct il_queue *q = &txq->q; in il_hcmd_queue_reclaim()
3279 struct il_tx_queue *txq = &il->txq[il->cmd_queue]; in il_tx_cmd_complete() local
3288 txq_id, il->cmd_queue, sequence, il->txq[il->cmd_queue].q.read_ptr, in il_tx_cmd_complete()
3289 il->txq[il->cmd_queue].q.write_ptr)) { in il_tx_cmd_complete()
3294 cmd_idx = il_get_cmd_idx(&txq->q, idx, huge); in il_tx_cmd_complete()
3295 cmd = txq->cmd[cmd_idx]; in il_tx_cmd_complete()
3296 meta = &txq->meta[cmd_idx]; in il_tx_cmd_complete()
3298 txq->time_stamp = jiffies; in il_tx_cmd_complete()
4630 if (!il->txq) in il_alloc_txq_mem()
4631 il->txq = in il_alloc_txq_mem()
4635 if (!il->txq) { in il_alloc_txq_mem()
4646 kfree(il->txq); in il_free_txq_mem()
4647 il->txq = NULL; in il_free_txq_mem()
4754 if (il->txq == NULL) in il_mac_flush()
4763 q = &il->txq[i].q; in il_mac_flush()
4787 struct il_tx_queue *txq = &il->txq[cnt]; in il_check_stuck_queue() local
4788 struct il_queue *q = &txq->q; in il_check_stuck_queue()
4794 txq->time_stamp = now; in il_check_stuck_queue()
4799 txq->time_stamp + in il_check_stuck_queue()
4804 jiffies_to_msecs(now - txq->time_stamp)); in il_check_stuck_queue()