Lines Matching refs:tpd_ring

1021 	struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring;  in atl1_setup_ring_resources()  local
1029 size = sizeof(struct atl1_buffer) * (tpd_ring->count + rfd_ring->count); in atl1_setup_ring_resources()
1030 tpd_ring->buffer_info = kzalloc(size, GFP_KERNEL); in atl1_setup_ring_resources()
1031 if (unlikely(!tpd_ring->buffer_info)) { in atl1_setup_ring_resources()
1038 (tpd_ring->buffer_info + tpd_ring->count); in atl1_setup_ring_resources()
1046 sizeof(struct tx_packet_desc) * tpd_ring->count in atl1_setup_ring_resources()
1062 tpd_ring->dma = ring_header->dma; in atl1_setup_ring_resources()
1063 offset = (tpd_ring->dma & 0x7) ? (8 - (ring_header->dma & 0x7)) : 0; in atl1_setup_ring_resources()
1064 tpd_ring->dma += offset; in atl1_setup_ring_resources()
1065 tpd_ring->desc = (u8 *) ring_header->desc + offset; in atl1_setup_ring_resources()
1066 tpd_ring->size = sizeof(struct tx_packet_desc) * tpd_ring->count; in atl1_setup_ring_resources()
1069 rfd_ring->dma = tpd_ring->dma + tpd_ring->size; in atl1_setup_ring_resources()
1072 rfd_ring->desc = (u8 *) tpd_ring->desc + (tpd_ring->size + offset); in atl1_setup_ring_resources()
1102 kfree(tpd_ring->buffer_info); in atl1_setup_ring_resources()
1108 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_init_ring_ptrs() local
1112 atomic_set(&tpd_ring->next_to_use, 0); in atl1_init_ring_ptrs()
1113 atomic_set(&tpd_ring->next_to_clean, 0); in atl1_init_ring_ptrs()
1168 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_clean_tx_ring() local
1175 for (i = 0; i < tpd_ring->count; i++) { in atl1_clean_tx_ring()
1176 buffer_info = &tpd_ring->buffer_info[i]; in atl1_clean_tx_ring()
1184 for (i = 0; i < tpd_ring->count; i++) { in atl1_clean_tx_ring()
1185 buffer_info = &tpd_ring->buffer_info[i]; in atl1_clean_tx_ring()
1192 size = sizeof(struct atl1_buffer) * tpd_ring->count; in atl1_clean_tx_ring()
1193 memset(tpd_ring->buffer_info, 0, size); in atl1_clean_tx_ring()
1196 memset(tpd_ring->desc, 0, tpd_ring->size); in atl1_clean_tx_ring()
1198 atomic_set(&tpd_ring->next_to_use, 0); in atl1_clean_tx_ring()
1199 atomic_set(&tpd_ring->next_to_clean, 0); in atl1_clean_tx_ring()
1211 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_free_ring_resources() local
1219 kfree(tpd_ring->buffer_info); in atl1_free_ring_resources()
1223 tpd_ring->buffer_info = NULL; in atl1_free_ring_resources()
1224 tpd_ring->desc = NULL; in atl1_free_ring_resources()
1225 tpd_ring->dma = 0; in atl1_free_ring_resources()
1471 iowrite32((u32) ((adapter->tpd_ring.dma & 0xffffffff00000000ULL) >> 32), in atl1_configure()
1478 iowrite32((u32) (adapter->tpd_ring.dma & 0x00000000ffffffffULL), in atl1_configure()
1490 iowrite32(adapter->tpd_ring.count, hw->hw_addr + in atl1_configure()
1497 value = ((atomic_read(&adapter->tpd_ring.next_to_use) in atl1_configure()
1597 value = (hw->cmb_tpd > adapter->tpd_ring.count) ? in atl1_configure()
1598 hw->cmb_tpd : adapter->tpd_ring.count; in atl1_configure()
1743 tpd_next_to_use = atomic_read(&adapter->tpd_ring.next_to_use); in atl1_update_mailbox()
2033 tpd_next_to_use = atomic_read(&adapter->tpd_ring.next_to_use); in atl1_intr_rx()
2053 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_intr_tx() local
2059 sw_tpd_next_to_clean = atomic_read(&tpd_ring->next_to_clean); in atl1_intr_tx()
2063 buffer_info = &tpd_ring->buffer_info[sw_tpd_next_to_clean]; in atl1_intr_tx()
2075 if (++sw_tpd_next_to_clean == tpd_ring->count) in atl1_intr_tx()
2080 atomic_set(&tpd_ring->next_to_clean, sw_tpd_next_to_clean); in atl1_intr_tx()
2089 static u16 atl1_tpd_avail(struct atl1_tpd_ring *tpd_ring) in atl1_tpd_avail() argument
2091 u16 next_to_clean = atomic_read(&tpd_ring->next_to_clean); in atl1_tpd_avail()
2092 u16 next_to_use = atomic_read(&tpd_ring->next_to_use); in atl1_tpd_avail()
2095 tpd_ring->count + next_to_clean - next_to_use - 1; in atl1_tpd_avail()
2186 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_tx_map() local
2200 next_to_use = atomic_read(&tpd_ring->next_to_use); in atl1_tx_map()
2201 buffer_info = &tpd_ring->buffer_info[next_to_use]; in atl1_tx_map()
2217 if (++next_to_use == tpd_ring->count) in atl1_tx_map()
2228 &tpd_ring->buffer_info[next_to_use]; in atl1_tx_map()
2242 if (++next_to_use == tpd_ring->count) in atl1_tx_map()
2254 if (++next_to_use == tpd_ring->count) in atl1_tx_map()
2267 buffer_info = &tpd_ring->buffer_info[next_to_use]; in atl1_tx_map()
2278 if (++next_to_use == tpd_ring->count) in atl1_tx_map()
2290 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_tx_queue() local
2295 u16 next_to_use = (u16) atomic_read(&tpd_ring->next_to_use); in atl1_tx_queue()
2298 buffer_info = &tpd_ring->buffer_info[next_to_use]; in atl1_tx_queue()
2299 tpd = ATL1_TPD_DESC(&adapter->tpd_ring, next_to_use); in atl1_tx_queue()
2323 if (++next_to_use == tpd_ring->count) in atl1_tx_queue()
2334 atomic_set(&tpd_ring->next_to_use, next_to_use); in atl1_tx_queue()
2341 struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; in atl1_xmit_frame() local
2384 if (atl1_tpd_avail(&adapter->tpd_ring) < count) { in atl1_xmit_frame()
2393 ptpd = ATL1_TPD_DESC(tpd_ring, in atl1_xmit_frame()
2394 (u16) atomic_read(&tpd_ring->next_to_use)); in atl1_xmit_frame()
2971 adapter->tpd_ring.count = ATL1_DEFAULT_TPD; in atl1_probe()
3446 struct atl1_tpd_ring *txdr = &adapter->tpd_ring; in atl1_get_ringparam()
3461 struct atl1_tpd_ring *tpdr = &adapter->tpd_ring; in atl1_set_ringparam()
3473 tpd_old = adapter->tpd_ring; in atl1_set_ringparam()
3505 tpd_new = adapter->tpd_ring; in atl1_set_ringparam()
3509 adapter->tpd_ring = tpd_old; in atl1_set_ringparam()
3520 adapter->tpd_ring = tpd_new; in atl1_set_ringparam()
3534 adapter->tpd_ring = tpd_old; in atl1_set_ringparam()