Lines Matching refs:src_ring

279 			  (ctrl1_addr & ~(ctrl_regs->src_ring->mask)) |  in ath10k_ce_src_ring_byte_swap_set()
280 ath10k_set_ring_byte(n, ctrl_regs->src_ring)); in ath10k_ce_src_ring_byte_swap_set()
496 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in _ath10k_ce_send_nolock() local
498 unsigned int nentries_mask = src_ring->nentries_mask; in _ath10k_ce_send_nolock()
499 unsigned int sw_index = src_ring->sw_index; in _ath10k_ce_send_nolock()
500 unsigned int write_index = src_ring->write_index; in _ath10k_ce_send_nolock()
515 desc = CE_SRC_RING_TO_DESC(src_ring->base_addr_owner_space, in _ath10k_ce_send_nolock()
531 src_ring->per_transfer_context[write_index] = per_transfer_context; in _ath10k_ce_send_nolock()
540 src_ring->write_index = write_index; in _ath10k_ce_send_nolock()
553 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in _ath10k_ce_send_nolock_64() local
555 unsigned int nentries_mask = src_ring->nentries_mask; in _ath10k_ce_send_nolock_64()
557 unsigned int write_index = src_ring->write_index; in _ath10k_ce_send_nolock_64()
573 sw_index = src_ring->sw_index; in _ath10k_ce_send_nolock_64()
581 desc = CE_SRC_RING_TO_DESC_64(src_ring->base_addr_owner_space, in _ath10k_ce_send_nolock_64()
607 src_ring->per_transfer_context[write_index] = per_transfer_context; in _ath10k_ce_send_nolock_64()
621 src_ring->write_index = write_index; in _ath10k_ce_send_nolock_64()
642 struct ath10k_ce_ring *src_ring = pipe->src_ring; in __ath10k_ce_send_revert() local
652 if (WARN_ON_ONCE(src_ring->write_index == src_ring->sw_index)) in __ath10k_ce_send_revert()
655 if (WARN_ON_ONCE(src_ring->write_index == in __ath10k_ce_send_revert()
659 src_ring->write_index--; in __ath10k_ce_send_revert()
660 src_ring->write_index &= src_ring->nentries_mask; in __ath10k_ce_send_revert()
662 src_ring->per_transfer_context[src_ring->write_index] = NULL; in __ath10k_ce_send_revert()
693 delta = CE_RING_DELTA(pipe->src_ring->nentries_mask, in ath10k_ce_num_free_src_entries()
694 pipe->src_ring->write_index, in ath10k_ce_num_free_src_entries()
695 pipe->src_ring->sw_index - 1); in ath10k_ce_num_free_src_entries()
1072 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in _ath10k_ce_completed_send_next_nolock() local
1075 unsigned int nentries_mask = src_ring->nentries_mask; in _ath10k_ce_completed_send_next_nolock()
1076 unsigned int sw_index = src_ring->sw_index; in _ath10k_ce_completed_send_next_nolock()
1080 if (src_ring->hw_index == sw_index) { in _ath10k_ce_completed_send_next_nolock()
1094 src_ring->hw_index = read_index; in _ath10k_ce_completed_send_next_nolock()
1100 read_index = src_ring->hw_index; in _ath10k_ce_completed_send_next_nolock()
1107 src_ring->per_transfer_context[sw_index]; in _ath10k_ce_completed_send_next_nolock()
1110 src_ring->per_transfer_context[sw_index] = NULL; in _ath10k_ce_completed_send_next_nolock()
1111 desc = CE_SRC_RING_TO_DESC(src_ring->base_addr_owner_space, in _ath10k_ce_completed_send_next_nolock()
1117 src_ring->sw_index = sw_index; in _ath10k_ce_completed_send_next_nolock()
1125 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in _ath10k_ce_completed_send_next_nolock_64() local
1128 unsigned int nentries_mask = src_ring->nentries_mask; in _ath10k_ce_completed_send_next_nolock_64()
1129 unsigned int sw_index = src_ring->sw_index; in _ath10k_ce_completed_send_next_nolock_64()
1133 if (src_ring->hw_index == sw_index) { in _ath10k_ce_completed_send_next_nolock_64()
1147 src_ring->hw_index = read_index; in _ath10k_ce_completed_send_next_nolock_64()
1153 read_index = src_ring->hw_index; in _ath10k_ce_completed_send_next_nolock_64()
1160 src_ring->per_transfer_context[sw_index]; in _ath10k_ce_completed_send_next_nolock_64()
1163 src_ring->per_transfer_context[sw_index] = NULL; in _ath10k_ce_completed_send_next_nolock_64()
1164 desc = CE_SRC_RING_TO_DESC_64(src_ring->base_addr_owner_space, in _ath10k_ce_completed_send_next_nolock_64()
1170 src_ring->sw_index = sw_index; in _ath10k_ce_completed_send_next_nolock_64()
1184 struct ath10k_ce_ring *src_ring, in ath10k_ce_extract_desc_data() argument
1190 struct ce_desc *base = src_ring->base_addr_owner_space; in ath10k_ce_extract_desc_data()
1201 struct ath10k_ce_ring *src_ring, in ath10k_ce_extract_desc_data_64() argument
1207 struct ce_desc_64 *base = src_ring->base_addr_owner_space; in ath10k_ce_extract_desc_data_64()
1225 struct ath10k_ce_ring *src_ring; in ath10k_ce_cancel_send_next() local
1233 src_ring = ce_state->src_ring; in ath10k_ce_cancel_send_next()
1235 if (!src_ring) in ath10k_ce_cancel_send_next()
1243 nentries_mask = src_ring->nentries_mask; in ath10k_ce_cancel_send_next()
1244 sw_index = src_ring->sw_index; in ath10k_ce_cancel_send_next()
1245 write_index = src_ring->write_index; in ath10k_ce_cancel_send_next()
1248 ce_state->ops->ce_extract_desc_data(ar, src_ring, sw_index, in ath10k_ce_cancel_send_next()
1254 src_ring->per_transfer_context[sw_index]; in ath10k_ce_cancel_send_next()
1257 src_ring->per_transfer_context[sw_index] = NULL; in ath10k_ce_cancel_send_next()
1261 src_ring->sw_index = sw_index; in ath10k_ce_cancel_send_next()
1428 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in ath10k_ce_init_src_ring() local
1434 memset(src_ring->base_addr_owner_space, 0, in ath10k_ce_init_src_ring()
1437 memset(src_ring->base_addr_owner_space, 0, in ath10k_ce_init_src_ring()
1440 src_ring->sw_index = ath10k_ce_src_ring_read_index_get(ar, ctrl_addr); in ath10k_ce_init_src_ring()
1441 src_ring->sw_index &= src_ring->nentries_mask; in ath10k_ce_init_src_ring()
1442 src_ring->hw_index = src_ring->sw_index; in ath10k_ce_init_src_ring()
1444 src_ring->write_index = in ath10k_ce_init_src_ring()
1446 src_ring->write_index &= src_ring->nentries_mask; in ath10k_ce_init_src_ring()
1449 src_ring->base_addr_ce_space); in ath10k_ce_init_src_ring()
1458 ce_id, nentries, src_ring->base_addr_owner_space); in ath10k_ce_init_src_ring()
1502 struct ath10k_ce_ring *src_ring, in ath10k_ce_alloc_shadow_base() argument
1505 src_ring->shadow_base_unaligned = kcalloc(nentries, in ath10k_ce_alloc_shadow_base()
1508 if (!src_ring->shadow_base_unaligned) in ath10k_ce_alloc_shadow_base()
1511 src_ring->shadow_base = (struct ce_desc_64 *) in ath10k_ce_alloc_shadow_base()
1512 PTR_ALIGN(src_ring->shadow_base_unaligned, in ath10k_ce_alloc_shadow_base()
1521 struct ath10k_ce_ring *src_ring; in ath10k_ce_alloc_src_ring() local
1528 src_ring = kzalloc(struct_size(src_ring, per_transfer_context, in ath10k_ce_alloc_src_ring()
1530 if (src_ring == NULL) in ath10k_ce_alloc_src_ring()
1533 src_ring->nentries = nentries; in ath10k_ce_alloc_src_ring()
1534 src_ring->nentries_mask = nentries - 1; in ath10k_ce_alloc_src_ring()
1540 src_ring->base_addr_owner_space_unaligned = in ath10k_ce_alloc_src_ring()
1545 if (!src_ring->base_addr_owner_space_unaligned) { in ath10k_ce_alloc_src_ring()
1546 kfree(src_ring); in ath10k_ce_alloc_src_ring()
1550 src_ring->base_addr_ce_space_unaligned = base_addr; in ath10k_ce_alloc_src_ring()
1552 src_ring->base_addr_owner_space = in ath10k_ce_alloc_src_ring()
1553 PTR_ALIGN(src_ring->base_addr_owner_space_unaligned, in ath10k_ce_alloc_src_ring()
1555 src_ring->base_addr_ce_space = in ath10k_ce_alloc_src_ring()
1556 ALIGN(src_ring->base_addr_ce_space_unaligned, in ath10k_ce_alloc_src_ring()
1560 ret = ath10k_ce_alloc_shadow_base(ar, src_ring, nentries); in ath10k_ce_alloc_src_ring()
1565 src_ring->base_addr_owner_space_unaligned, in ath10k_ce_alloc_src_ring()
1567 kfree(src_ring); in ath10k_ce_alloc_src_ring()
1572 return src_ring; in ath10k_ce_alloc_src_ring()
1579 struct ath10k_ce_ring *src_ring; in ath10k_ce_alloc_src_ring_64() local
1586 src_ring = kzalloc(struct_size(src_ring, per_transfer_context, in ath10k_ce_alloc_src_ring_64()
1588 if (!src_ring) in ath10k_ce_alloc_src_ring_64()
1591 src_ring->nentries = nentries; in ath10k_ce_alloc_src_ring_64()
1592 src_ring->nentries_mask = nentries - 1; in ath10k_ce_alloc_src_ring_64()
1597 src_ring->base_addr_owner_space_unaligned = in ath10k_ce_alloc_src_ring_64()
1602 if (!src_ring->base_addr_owner_space_unaligned) { in ath10k_ce_alloc_src_ring_64()
1603 kfree(src_ring); in ath10k_ce_alloc_src_ring_64()
1607 src_ring->base_addr_ce_space_unaligned = base_addr; in ath10k_ce_alloc_src_ring_64()
1609 src_ring->base_addr_owner_space = in ath10k_ce_alloc_src_ring_64()
1610 PTR_ALIGN(src_ring->base_addr_owner_space_unaligned, in ath10k_ce_alloc_src_ring_64()
1612 src_ring->base_addr_ce_space = in ath10k_ce_alloc_src_ring_64()
1613 ALIGN(src_ring->base_addr_ce_space_unaligned, in ath10k_ce_alloc_src_ring_64()
1617 ret = ath10k_ce_alloc_shadow_base(ar, src_ring, nentries); in ath10k_ce_alloc_src_ring_64()
1622 src_ring->base_addr_owner_space_unaligned, in ath10k_ce_alloc_src_ring_64()
1624 kfree(src_ring); in ath10k_ce_alloc_src_ring_64()
1629 return src_ring; in ath10k_ce_alloc_src_ring_64()
1787 if (ce_state->src_ring) { in _ath10k_ce_free_pipe()
1789 kfree(ce_state->src_ring->shadow_base_unaligned); in _ath10k_ce_free_pipe()
1791 (ce_state->src_ring->nentries * in _ath10k_ce_free_pipe()
1794 ce_state->src_ring->base_addr_owner_space, in _ath10k_ce_free_pipe()
1795 ce_state->src_ring->base_addr_ce_space); in _ath10k_ce_free_pipe()
1796 kfree(ce_state->src_ring); in _ath10k_ce_free_pipe()
1809 ce_state->src_ring = NULL; in _ath10k_ce_free_pipe()
1818 if (ce_state->src_ring) { in _ath10k_ce_free_pipe_64()
1820 kfree(ce_state->src_ring->shadow_base_unaligned); in _ath10k_ce_free_pipe_64()
1822 (ce_state->src_ring->nentries * in _ath10k_ce_free_pipe_64()
1825 ce_state->src_ring->base_addr_owner_space, in _ath10k_ce_free_pipe_64()
1826 ce_state->src_ring->base_addr_ce_space); in _ath10k_ce_free_pipe_64()
1827 kfree(ce_state->src_ring); in _ath10k_ce_free_pipe_64()
1840 ce_state->src_ring = NULL; in _ath10k_ce_free_pipe_64()
1968 ce_state->src_ring = in ath10k_ce_alloc_pipe()
1970 if (IS_ERR(ce_state->src_ring)) { in ath10k_ce_alloc_pipe()
1971 ret = PTR_ERR(ce_state->src_ring); in ath10k_ce_alloc_pipe()
1974 ce_state->src_ring = NULL; in ath10k_ce_alloc_pipe()