Lines Matching refs:tpd_ring
1039 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
1047 size = sizeof(struct atl1_buffer) * (tpd_ring->count + rfd_ring->count);
1048 tpd_ring->buffer_info = kzalloc(size, GFP_KERNEL);
1049 if (unlikely(!tpd_ring->buffer_info)) {
1056 (struct atl1_buffer *)(tpd_ring->buffer_info + tpd_ring->count);
1064 sizeof(struct tx_packet_desc) * tpd_ring->count
1082 tpd_ring->dma = ring_header->dma;
1083 offset = (tpd_ring->dma & 0x7) ? (8 - (ring_header->dma & 0x7)) : 0;
1084 tpd_ring->dma += offset;
1085 tpd_ring->desc = (u8 *) ring_header->desc + offset;
1086 tpd_ring->size = sizeof(struct tx_packet_desc) * tpd_ring->count;
1089 rfd_ring->dma = tpd_ring->dma + tpd_ring->size;
1092 rfd_ring->desc = (u8 *) tpd_ring->desc + (tpd_ring->size + offset);
1122 kfree(tpd_ring->buffer_info);
1128 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
1132 atomic_set(&tpd_ring->next_to_use, 0);
1133 atomic_set(&tpd_ring->next_to_clean, 0);
1188 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
1195 for (i = 0; i < tpd_ring->count; i++) {
1196 buffer_info = &tpd_ring->buffer_info[i];
1204 for (i = 0; i < tpd_ring->count; i++) {
1205 buffer_info = &tpd_ring->buffer_info[i];
1212 size = sizeof(struct atl1_buffer) * tpd_ring->count;
1213 memset(tpd_ring->buffer_info, 0, size);
1216 memset(tpd_ring->desc, 0, tpd_ring->size);
1218 atomic_set(&tpd_ring->next_to_use, 0);
1219 atomic_set(&tpd_ring->next_to_clean, 0);
1231 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
1239 kfree(tpd_ring->buffer_info);
1243 tpd_ring->buffer_info = NULL;
1244 tpd_ring->desc = NULL;
1245 tpd_ring->dma = 0;
1492 iowrite32((u32) ((adapter->tpd_ring.dma & 0xffffffff00000000ULL) >> 32),
1499 iowrite32((u32) (adapter->tpd_ring.dma & 0x00000000ffffffffULL),
1511 iowrite32(adapter->tpd_ring.count, hw->hw_addr +
1518 value = ((atomic_read(&adapter->tpd_ring.next_to_use)
1618 value = (hw->cmb_tpd > adapter->tpd_ring.count) ?
1619 hw->cmb_tpd : adapter->tpd_ring.count;
1757 tpd_next_to_use = atomic_read(&adapter->tpd_ring.next_to_use);
2046 tpd_next_to_use = atomic_read(&adapter->tpd_ring.next_to_use);
2064 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
2069 sw_tpd_next_to_clean = atomic_read(&tpd_ring->next_to_clean);
2075 tpd = ATL1_TPD_DESC(tpd_ring, sw_tpd_next_to_clean);
2076 buffer_info = &tpd_ring->buffer_info[sw_tpd_next_to_clean];
2088 if (++sw_tpd_next_to_clean == tpd_ring->count)
2091 atomic_set(&tpd_ring->next_to_clean, sw_tpd_next_to_clean);
2098 static u16 atl1_tpd_avail(struct atl1_tpd_ring *tpd_ring)
2100 u16 next_to_clean = atomic_read(&tpd_ring->next_to_clean);
2101 u16 next_to_use = atomic_read(&tpd_ring->next_to_use);
2104 tpd_ring->count + next_to_clean - next_to_use - 1);
2196 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
2210 next_to_use = atomic_read(&tpd_ring->next_to_use);
2211 buffer_info = &tpd_ring->buffer_info[next_to_use];
2227 if (++next_to_use == tpd_ring->count)
2238 &tpd_ring->buffer_info[next_to_use];
2252 if (++next_to_use == tpd_ring->count)
2263 if (++next_to_use == tpd_ring->count)
2277 buffer_info = &tpd_ring->buffer_info[next_to_use];
2289 if (++next_to_use == tpd_ring->count)
2301 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
2306 u16 next_to_use = (u16) atomic_read(&tpd_ring->next_to_use);
2309 buffer_info = &tpd_ring->buffer_info[next_to_use];
2310 tpd = ATL1_TPD_DESC(&adapter->tpd_ring, next_to_use);
2334 if (++next_to_use == tpd_ring->count)
2345 atomic_set(&tpd_ring->next_to_use, next_to_use);
2352 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;
2397 if (atl1_tpd_avail(&adapter->tpd_ring) < count) {
2406 ptpd = ATL1_TPD_DESC(tpd_ring,
2407 (u16) atomic_read(&tpd_ring->next_to_use));
2980 adapter->tpd_ring.count = ATL1_DEFAULT_TPD;
3480 struct atl1_tpd_ring *txdr = &adapter->tpd_ring;
3497 struct atl1_tpd_ring *tpdr = &adapter->tpd_ring;
3509 tpd_old = adapter->tpd_ring;
3541 tpd_new = adapter->tpd_ring;
3545 adapter->tpd_ring = tpd_old;
3556 adapter->tpd_ring = tpd_new;
3570 adapter->tpd_ring = tpd_old;