Lines Matching defs:txq
364 il->txq[il->cmd_queue].meta[cmd_idx].flags &= ~CMD_WANT_SKB;
2709 il_txq_update_write_ptr(struct il_priv *il, struct il_tx_queue *txq)
2712 int txq_id = txq->q.id;
2714 if (txq->need_update == 0)
2732 il_wr(il, HBUS_TARG_WRPTR, txq->q.write_ptr | (txq_id << 8));
2740 _il_wr(il, HBUS_TARG_WRPTR, txq->q.write_ptr | (txq_id << 8));
2741 txq->need_update = 0;
2751 struct il_tx_queue *txq = &il->txq[txq_id];
2752 struct il_queue *q = &txq->q;
2758 il->ops->txq_free_tfd(il, txq);
2766 * @txq: Transmit queue to deallocate.
2770 * 0-fill, but do not free "txq" descriptor structure.
2775 struct il_tx_queue *txq = &il->txq[txq_id];
2782 if (txq->cmd) {
2784 kfree(txq->cmd[i]);
2788 if (txq->q.n_bd)
2789 dma_free_coherent(dev, il->hw_params.tfd_size * txq->q.n_bd,
2790 txq->tfds, txq->q.dma_addr);
2793 kfree(txq->skbs);
2794 txq->skbs = NULL;
2797 kfree(txq->cmd);
2798 kfree(txq->meta);
2799 txq->cmd = NULL;
2800 txq->meta = NULL;
2803 memset(txq, 0, sizeof(*txq));
2813 struct il_tx_queue *txq = &il->txq[il->cmd_queue];
2814 struct il_queue *q = &txq->q;
2823 if (txq->meta[i].flags & CMD_MAPPED) {
2825 dma_unmap_addr(&txq->meta[i], mapping),
2826 dma_unmap_len(&txq->meta[i], len),
2828 txq->meta[i].flags = 0;
2835 if (txq->meta[i].flags & CMD_MAPPED) {
2837 dma_unmap_addr(&txq->meta[i], mapping),
2838 dma_unmap_len(&txq->meta[i], len),
2840 txq->meta[i].flags = 0;
2850 * 0-fill, but do not free "txq" descriptor structure.
2855 struct il_tx_queue *txq = &il->txq[il->cmd_queue];
2862 if (txq->cmd) {
2864 kfree(txq->cmd[i]);
2868 if (txq->q.n_bd)
2869 dma_free_coherent(dev, il->hw_params.tfd_size * txq->q.n_bd,
2870 txq->tfds, txq->q.dma_addr);
2873 kfree(txq->cmd);
2874 kfree(txq->meta);
2875 txq->cmd = NULL;
2876 txq->meta = NULL;
2879 memset(txq, 0, sizeof(*txq));
2963 il_tx_queue_alloc(struct il_priv *il, struct il_tx_queue *txq, u32 id)
2971 txq->skbs = kcalloc(TFD_QUEUE_SIZE_MAX,
2974 if (!txq->skbs) {
2979 txq->skbs = NULL;
2983 txq->tfds =
2984 dma_alloc_coherent(dev, tfd_sz, &txq->q.dma_addr, GFP_KERNEL);
2985 if (!txq->tfds)
2988 txq->q.id = id;
2993 kfree(txq->skbs);
2994 txq->skbs = NULL;
3007 struct il_tx_queue *txq = &il->txq[txq_id];
3025 txq->meta =
3027 txq->cmd =
3030 if (!txq->meta || !txq->cmd)
3039 txq->cmd[i] = kmalloc(len, GFP_KERNEL);
3040 if (!txq->cmd[i])
3045 ret = il_tx_queue_alloc(il, txq, txq_id);
3049 txq->need_update = 0;
3057 il_set_swq_id(txq, txq_id, txq_id);
3060 il_queue_init(il, &txq->q, slots, txq_id);
3063 il->ops->txq_init(il, txq);
3068 kfree(txq->cmd[i]);
3070 kfree(txq->meta);
3071 txq->meta = NULL;
3072 kfree(txq->cmd);
3073 txq->cmd = NULL;
3083 struct il_tx_queue *txq = &il->txq[txq_id];
3093 memset(txq->meta, 0, sizeof(struct il_cmd_meta) * actual_slots);
3094 txq->need_update = 0;
3097 il_queue_init(il, &txq->q, slots, txq_id);
3100 il->ops->txq_init(il, txq);
3118 struct il_tx_queue *txq = &il->txq[il->cmd_queue];
3119 struct il_queue *q = &txq->q;
3156 out_cmd = txq->cmd[idx];
3157 out_meta = &txq->meta[idx];
3212 txq->need_update = 1;
3216 il->ops->txq_update_byte_cnt_tbl(il, txq, 0);
3218 il->ops->txq_attach_buf_to_tfd(il, txq, phys_addr, fix_size, 1,
3223 il_txq_update_write_ptr(il, txq);
3240 struct il_tx_queue *txq = &il->txq[txq_id];
3241 struct il_queue *q = &txq->q;
3245 IL_ERR("Read idx for DMA queue txq id (%d), idx %d, "
3282 struct il_tx_queue *txq = &il->txq[il->cmd_queue];
3291 txq_id, il->cmd_queue, sequence, il->txq[il->cmd_queue].q.read_ptr,
3292 il->txq[il->cmd_queue].q.write_ptr)) {
3297 cmd_idx = il_get_cmd_idx(&txq->q, idx, huge);
3298 cmd = txq->cmd[cmd_idx];
3299 meta = &txq->meta[cmd_idx];
3301 txq->time_stamp = jiffies;
4633 if (!il->txq)
4634 il->txq =
4638 if (!il->txq) {
4639 IL_ERR("Not enough memory for txq\n");
4649 kfree(il->txq);
4650 il->txq = NULL;
4757 if (il->txq == NULL)
4766 q = &il->txq[i].q;
4790 struct il_tx_queue *txq = &il->txq[cnt];
4791 struct il_queue *q = &txq->q;
4797 txq->time_stamp = now;
4802 txq->time_stamp +
4807 jiffies_to_msecs(now - txq->time_stamp));