Lines Matching refs:tpd_ring

1040 	struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;  in atl1_setup_ring_resources()  local
1048 size = sizeof(struct atl1_buffer) * (tpd_ring->count + rfd_ring->count); in atl1_setup_ring_resources()
1049 tpd_ring->buffer_info = kzalloc(size, GFP_KERNEL); in atl1_setup_ring_resources()
1050 if (unlikely(!tpd_ring->buffer_info)) { in atl1_setup_ring_resources()
1057 (tpd_ring->buffer_info + tpd_ring->count); in atl1_setup_ring_resources()
1065 sizeof(struct tx_packet_desc) * tpd_ring->count in atl1_setup_ring_resources()
1083 tpd_ring->dma = ring_header->dma; in atl1_setup_ring_resources()
1084 offset = (tpd_ring->dma & 0x7) ? (8 - (ring_header->dma & 0x7)) : 0; in atl1_setup_ring_resources()
1085 tpd_ring->dma += offset; in atl1_setup_ring_resources()
1086 tpd_ring->desc = (u8 *) ring_header->desc + offset; in atl1_setup_ring_resources()
1087 tpd_ring->size = sizeof(struct tx_packet_desc) * tpd_ring->count; in atl1_setup_ring_resources()
1090 rfd_ring->dma = tpd_ring->dma + tpd_ring->size; in atl1_setup_ring_resources()
1093 rfd_ring->desc = (u8 *) tpd_ring->desc + (tpd_ring->size + offset); in atl1_setup_ring_resources()
1123 kfree(tpd_ring->buffer_info); in atl1_setup_ring_resources()
1129 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_init_ring_ptrs() local
1133 atomic_set(&tpd_ring->next_to_use, 0); in atl1_init_ring_ptrs()
1134 atomic_set(&tpd_ring->next_to_clean, 0); in atl1_init_ring_ptrs()
1189 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_clean_tx_ring() local
1196 for (i = 0; i < tpd_ring->count; i++) { in atl1_clean_tx_ring()
1197 buffer_info = &tpd_ring->buffer_info[i]; in atl1_clean_tx_ring()
1205 for (i = 0; i < tpd_ring->count; i++) { in atl1_clean_tx_ring()
1206 buffer_info = &tpd_ring->buffer_info[i]; in atl1_clean_tx_ring()
1213 size = sizeof(struct atl1_buffer) * tpd_ring->count; in atl1_clean_tx_ring()
1214 memset(tpd_ring->buffer_info, 0, size); in atl1_clean_tx_ring()
1217 memset(tpd_ring->desc, 0, tpd_ring->size); in atl1_clean_tx_ring()
1219 atomic_set(&tpd_ring->next_to_use, 0); in atl1_clean_tx_ring()
1220 atomic_set(&tpd_ring->next_to_clean, 0); in atl1_clean_tx_ring()
1232 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_free_ring_resources() local
1240 kfree(tpd_ring->buffer_info); in atl1_free_ring_resources()
1244 tpd_ring->buffer_info = NULL; in atl1_free_ring_resources()
1245 tpd_ring->desc = NULL; in atl1_free_ring_resources()
1246 tpd_ring->dma = 0; in atl1_free_ring_resources()
1492 iowrite32((u32) ((adapter->tpd_ring.dma & 0xffffffff00000000ULL) >> 32), in atl1_configure()
1499 iowrite32((u32) (adapter->tpd_ring.dma & 0x00000000ffffffffULL), in atl1_configure()
1511 iowrite32(adapter->tpd_ring.count, hw->hw_addr + in atl1_configure()
1518 value = ((atomic_read(&adapter->tpd_ring.next_to_use) in atl1_configure()
1618 value = (hw->cmb_tpd > adapter->tpd_ring.count) ? in atl1_configure()
1619 hw->cmb_tpd : adapter->tpd_ring.count; in atl1_configure()
1764 tpd_next_to_use = atomic_read(&adapter->tpd_ring.next_to_use); in atl1_update_mailbox()
2054 tpd_next_to_use = atomic_read(&adapter->tpd_ring.next_to_use); in atl1_intr_rx()
2074 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_intr_tx() local
2080 sw_tpd_next_to_clean = atomic_read(&tpd_ring->next_to_clean); in atl1_intr_tx()
2084 buffer_info = &tpd_ring->buffer_info[sw_tpd_next_to_clean]; in atl1_intr_tx()
2096 if (++sw_tpd_next_to_clean == tpd_ring->count) in atl1_intr_tx()
2101 atomic_set(&tpd_ring->next_to_clean, sw_tpd_next_to_clean); in atl1_intr_tx()
2110 static u16 atl1_tpd_avail(struct atl1_tpd_ring *tpd_ring) in atl1_tpd_avail() argument
2112 u16 next_to_clean = atomic_read(&tpd_ring->next_to_clean); in atl1_tpd_avail()
2113 u16 next_to_use = atomic_read(&tpd_ring->next_to_use); in atl1_tpd_avail()
2116 tpd_ring->count + next_to_clean - next_to_use - 1; in atl1_tpd_avail()
2207 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_tx_map() local
2221 next_to_use = atomic_read(&tpd_ring->next_to_use); in atl1_tx_map()
2222 buffer_info = &tpd_ring->buffer_info[next_to_use]; in atl1_tx_map()
2238 if (++next_to_use == tpd_ring->count) in atl1_tx_map()
2249 &tpd_ring->buffer_info[next_to_use]; in atl1_tx_map()
2262 if (++next_to_use == tpd_ring->count) in atl1_tx_map()
2273 if (++next_to_use == tpd_ring->count) in atl1_tx_map()
2287 buffer_info = &tpd_ring->buffer_info[next_to_use]; in atl1_tx_map()
2298 if (++next_to_use == tpd_ring->count) in atl1_tx_map()
2310 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_tx_queue() local
2315 u16 next_to_use = (u16) atomic_read(&tpd_ring->next_to_use); in atl1_tx_queue()
2318 buffer_info = &tpd_ring->buffer_info[next_to_use]; in atl1_tx_queue()
2319 tpd = ATL1_TPD_DESC(&adapter->tpd_ring, next_to_use); in atl1_tx_queue()
2343 if (++next_to_use == tpd_ring->count) in atl1_tx_queue()
2354 atomic_set(&tpd_ring->next_to_use, next_to_use); in atl1_tx_queue()
2361 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_xmit_frame() local
2404 if (atl1_tpd_avail(&adapter->tpd_ring) < count) { in atl1_xmit_frame()
2413 ptpd = ATL1_TPD_DESC(tpd_ring, in atl1_xmit_frame()
2414 (u16) atomic_read(&tpd_ring->next_to_use)); in atl1_xmit_frame()
2996 adapter->tpd_ring.count = ATL1_DEFAULT_TPD; in atl1_probe()
3490 struct atl1_tpd_ring *txdr = &adapter->tpd_ring; in atl1_get_ringparam()
3503 struct atl1_tpd_ring *tpdr = &adapter->tpd_ring; in atl1_set_ringparam()
3515 tpd_old = adapter->tpd_ring; in atl1_set_ringparam()
3547 tpd_new = adapter->tpd_ring; in atl1_set_ringparam()
3551 adapter->tpd_ring = tpd_old; in atl1_set_ringparam()
3562 adapter->tpd_ring = tpd_new; in atl1_set_ringparam()
3576 adapter->tpd_ring = tpd_old; in atl1_set_ringparam()