Lines Matching refs:txq

57 	struct alx_buffer *txb = &alx->txq.bufs[entry];
132 struct alx_tx_queue *txq = &alx->txq;
134 if (txq->write_idx >= txq->read_idx)
135 return alx->tx_ringsz + txq->read_idx - txq->write_idx - 1;
136 return txq->read_idx - txq->write_idx - 1;
141 struct alx_tx_queue *txq = &alx->txq;
146 sw_read_idx = txq->read_idx;
153 skb = txq->bufs[sw_read_idx].skb;
165 txq->read_idx = sw_read_idx;
374 alx->txq.read_idx = 0;
375 alx->txq.write_idx = 0;
377 alx_write_mem32(hw, ALX_TPD_PRI0_ADDR_LO, alx->txq.tpd_dma);
386 struct alx_tx_queue *txq = &alx->txq;
389 if (!txq->bufs)
395 memset(txq->bufs, 0, alx->tx_ringsz * sizeof(struct alx_buffer));
396 memset(txq->tpd, 0, alx->tx_ringsz * sizeof(struct alx_txd));
397 txq->write_idx = 0;
398 txq->read_idx = 0;
510 alx->txq.bufs = kcalloc(alx->tx_ringsz,
513 if (!alx->txq.bufs)
538 alx->txq.tpd = alx->descmem.virt;
539 alx->txq.tpd_dma = alx->descmem.dma;
563 kfree(alx->txq.bufs);
591 kfree(alx->txq.bufs);
1004 struct alx_tx_queue *txq = &alx->txq;
1007 int maplen, f, first_idx = txq->write_idx;
1009 first_tpd = &txq->tpd[txq->write_idx];
1018 dma_unmap_len_set(&txq->bufs[txq->write_idx], size, maplen);
1019 dma_unmap_addr_set(&txq->bufs[txq->write_idx], dma, dma);
1029 if (++txq->write_idx == alx->tx_ringsz)
1030 txq->write_idx = 0;
1031 tpd = &txq->tpd[txq->write_idx];
1040 dma_unmap_len_set(&txq->bufs[txq->write_idx], size, maplen);
1041 dma_unmap_addr_set(&txq->bufs[txq->write_idx], dma, dma);
1049 txq->bufs[txq->write_idx].skb = skb;
1051 if (++txq->write_idx == alx->tx_ringsz)
1052 txq->write_idx = 0;
1058 while (f != txq->write_idx) {
1070 struct alx_tx_queue *txq = &alx->txq;
1079 first = &txq->tpd[txq->write_idx];
1092 alx_write_mem16(&alx->hw, ALX_TPD_PRI0_PIDX, txq->write_idx);