Lines Matching refs:src_ring
228 (ctrl1_addr & ~(ctrl_regs->src_ring->mask)) | in ath10k_ce_src_ring_byte_swap_set()
229 ath10k_set_ring_byte(n, ctrl_regs->src_ring)); in ath10k_ce_src_ring_byte_swap_set()
432 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in _ath10k_ce_send_nolock() local
434 unsigned int nentries_mask = src_ring->nentries_mask; in _ath10k_ce_send_nolock()
435 unsigned int sw_index = src_ring->sw_index; in _ath10k_ce_send_nolock()
436 unsigned int write_index = src_ring->write_index; in _ath10k_ce_send_nolock()
451 desc = CE_SRC_RING_TO_DESC(src_ring->base_addr_owner_space, in _ath10k_ce_send_nolock()
467 src_ring->per_transfer_context[write_index] = per_transfer_context; in _ath10k_ce_send_nolock()
476 src_ring->write_index = write_index; in _ath10k_ce_send_nolock()
489 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in _ath10k_ce_send_nolock_64() local
491 unsigned int nentries_mask = src_ring->nentries_mask; in _ath10k_ce_send_nolock_64()
493 unsigned int write_index = src_ring->write_index; in _ath10k_ce_send_nolock_64()
509 sw_index = src_ring->sw_index; in _ath10k_ce_send_nolock_64()
517 desc = CE_SRC_RING_TO_DESC_64(src_ring->base_addr_owner_space, in _ath10k_ce_send_nolock_64()
543 src_ring->per_transfer_context[write_index] = per_transfer_context; in _ath10k_ce_send_nolock_64()
557 src_ring->write_index = write_index; in _ath10k_ce_send_nolock_64()
578 struct ath10k_ce_ring *src_ring = pipe->src_ring; in __ath10k_ce_send_revert() local
588 if (WARN_ON_ONCE(src_ring->write_index == src_ring->sw_index)) in __ath10k_ce_send_revert()
591 if (WARN_ON_ONCE(src_ring->write_index == in __ath10k_ce_send_revert()
595 src_ring->write_index--; in __ath10k_ce_send_revert()
596 src_ring->write_index &= src_ring->nentries_mask; in __ath10k_ce_send_revert()
598 src_ring->per_transfer_context[src_ring->write_index] = NULL; in __ath10k_ce_send_revert()
629 delta = CE_RING_DELTA(pipe->src_ring->nentries_mask, in ath10k_ce_num_free_src_entries()
630 pipe->src_ring->write_index, in ath10k_ce_num_free_src_entries()
631 pipe->src_ring->sw_index - 1); in ath10k_ce_num_free_src_entries()
1008 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in _ath10k_ce_completed_send_next_nolock() local
1011 unsigned int nentries_mask = src_ring->nentries_mask; in _ath10k_ce_completed_send_next_nolock()
1012 unsigned int sw_index = src_ring->sw_index; in _ath10k_ce_completed_send_next_nolock()
1016 if (src_ring->hw_index == sw_index) { in _ath10k_ce_completed_send_next_nolock()
1030 src_ring->hw_index = read_index; in _ath10k_ce_completed_send_next_nolock()
1036 read_index = src_ring->hw_index; in _ath10k_ce_completed_send_next_nolock()
1043 src_ring->per_transfer_context[sw_index]; in _ath10k_ce_completed_send_next_nolock()
1046 src_ring->per_transfer_context[sw_index] = NULL; in _ath10k_ce_completed_send_next_nolock()
1047 desc = CE_SRC_RING_TO_DESC(src_ring->base_addr_owner_space, in _ath10k_ce_completed_send_next_nolock()
1053 src_ring->sw_index = sw_index; in _ath10k_ce_completed_send_next_nolock()
1061 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in _ath10k_ce_completed_send_next_nolock_64() local
1064 unsigned int nentries_mask = src_ring->nentries_mask; in _ath10k_ce_completed_send_next_nolock_64()
1065 unsigned int sw_index = src_ring->sw_index; in _ath10k_ce_completed_send_next_nolock_64()
1069 if (src_ring->hw_index == sw_index) { in _ath10k_ce_completed_send_next_nolock_64()
1083 src_ring->hw_index = read_index; in _ath10k_ce_completed_send_next_nolock_64()
1089 read_index = src_ring->hw_index; in _ath10k_ce_completed_send_next_nolock_64()
1096 src_ring->per_transfer_context[sw_index]; in _ath10k_ce_completed_send_next_nolock_64()
1099 src_ring->per_transfer_context[sw_index] = NULL; in _ath10k_ce_completed_send_next_nolock_64()
1100 desc = CE_SRC_RING_TO_DESC_64(src_ring->base_addr_owner_space, in _ath10k_ce_completed_send_next_nolock_64()
1106 src_ring->sw_index = sw_index; in _ath10k_ce_completed_send_next_nolock_64()
1120 struct ath10k_ce_ring *src_ring, in ath10k_ce_extract_desc_data() argument
1126 struct ce_desc *base = src_ring->base_addr_owner_space; in ath10k_ce_extract_desc_data()
1137 struct ath10k_ce_ring *src_ring, in ath10k_ce_extract_desc_data_64() argument
1143 struct ce_desc_64 *base = src_ring->base_addr_owner_space; in ath10k_ce_extract_desc_data_64()
1161 struct ath10k_ce_ring *src_ring; in ath10k_ce_cancel_send_next() local
1169 src_ring = ce_state->src_ring; in ath10k_ce_cancel_send_next()
1171 if (!src_ring) in ath10k_ce_cancel_send_next()
1179 nentries_mask = src_ring->nentries_mask; in ath10k_ce_cancel_send_next()
1180 sw_index = src_ring->sw_index; in ath10k_ce_cancel_send_next()
1181 write_index = src_ring->write_index; in ath10k_ce_cancel_send_next()
1184 ce_state->ops->ce_extract_desc_data(ar, src_ring, sw_index, in ath10k_ce_cancel_send_next()
1190 src_ring->per_transfer_context[sw_index]; in ath10k_ce_cancel_send_next()
1193 src_ring->per_transfer_context[sw_index] = NULL; in ath10k_ce_cancel_send_next()
1197 src_ring->sw_index = sw_index; in ath10k_ce_cancel_send_next()
1364 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in ath10k_ce_init_src_ring() local
1370 memset(src_ring->base_addr_owner_space, 0, in ath10k_ce_init_src_ring()
1373 memset(src_ring->base_addr_owner_space, 0, in ath10k_ce_init_src_ring()
1376 src_ring->sw_index = ath10k_ce_src_ring_read_index_get(ar, ctrl_addr); in ath10k_ce_init_src_ring()
1377 src_ring->sw_index &= src_ring->nentries_mask; in ath10k_ce_init_src_ring()
1378 src_ring->hw_index = src_ring->sw_index; in ath10k_ce_init_src_ring()
1380 src_ring->write_index = in ath10k_ce_init_src_ring()
1382 src_ring->write_index &= src_ring->nentries_mask; in ath10k_ce_init_src_ring()
1385 src_ring->base_addr_ce_space); in ath10k_ce_init_src_ring()
1394 ce_id, nentries, src_ring->base_addr_owner_space); in ath10k_ce_init_src_ring()
1438 struct ath10k_ce_ring *src_ring, in ath10k_ce_alloc_shadow_base() argument
1441 src_ring->shadow_base_unaligned = kcalloc(nentries, in ath10k_ce_alloc_shadow_base()
1444 if (!src_ring->shadow_base_unaligned) in ath10k_ce_alloc_shadow_base()
1447 src_ring->shadow_base = (struct ce_desc_64 *) in ath10k_ce_alloc_shadow_base()
1448 PTR_ALIGN(src_ring->shadow_base_unaligned, in ath10k_ce_alloc_shadow_base()
1457 struct ath10k_ce_ring *src_ring; in ath10k_ce_alloc_src_ring() local
1464 src_ring = kzalloc(struct_size(src_ring, per_transfer_context, in ath10k_ce_alloc_src_ring()
1466 if (src_ring == NULL) in ath10k_ce_alloc_src_ring()
1469 src_ring->nentries = nentries; in ath10k_ce_alloc_src_ring()
1470 src_ring->nentries_mask = nentries - 1; in ath10k_ce_alloc_src_ring()
1476 src_ring->base_addr_owner_space_unaligned = in ath10k_ce_alloc_src_ring()
1481 if (!src_ring->base_addr_owner_space_unaligned) { in ath10k_ce_alloc_src_ring()
1482 kfree(src_ring); in ath10k_ce_alloc_src_ring()
1486 src_ring->base_addr_ce_space_unaligned = base_addr; in ath10k_ce_alloc_src_ring()
1488 src_ring->base_addr_owner_space = in ath10k_ce_alloc_src_ring()
1489 PTR_ALIGN(src_ring->base_addr_owner_space_unaligned, in ath10k_ce_alloc_src_ring()
1491 src_ring->base_addr_ce_space = in ath10k_ce_alloc_src_ring()
1492 ALIGN(src_ring->base_addr_ce_space_unaligned, in ath10k_ce_alloc_src_ring()
1496 ret = ath10k_ce_alloc_shadow_base(ar, src_ring, nentries); in ath10k_ce_alloc_src_ring()
1501 src_ring->base_addr_owner_space_unaligned, in ath10k_ce_alloc_src_ring()
1503 kfree(src_ring); in ath10k_ce_alloc_src_ring()
1508 return src_ring; in ath10k_ce_alloc_src_ring()
1515 struct ath10k_ce_ring *src_ring; in ath10k_ce_alloc_src_ring_64() local
1522 src_ring = kzalloc(struct_size(src_ring, per_transfer_context, in ath10k_ce_alloc_src_ring_64()
1524 if (!src_ring) in ath10k_ce_alloc_src_ring_64()
1527 src_ring->nentries = nentries; in ath10k_ce_alloc_src_ring_64()
1528 src_ring->nentries_mask = nentries - 1; in ath10k_ce_alloc_src_ring_64()
1533 src_ring->base_addr_owner_space_unaligned = in ath10k_ce_alloc_src_ring_64()
1538 if (!src_ring->base_addr_owner_space_unaligned) { in ath10k_ce_alloc_src_ring_64()
1539 kfree(src_ring); in ath10k_ce_alloc_src_ring_64()
1543 src_ring->base_addr_ce_space_unaligned = base_addr; in ath10k_ce_alloc_src_ring_64()
1545 src_ring->base_addr_owner_space = in ath10k_ce_alloc_src_ring_64()
1546 PTR_ALIGN(src_ring->base_addr_owner_space_unaligned, in ath10k_ce_alloc_src_ring_64()
1548 src_ring->base_addr_ce_space = in ath10k_ce_alloc_src_ring_64()
1549 ALIGN(src_ring->base_addr_ce_space_unaligned, in ath10k_ce_alloc_src_ring_64()
1553 ret = ath10k_ce_alloc_shadow_base(ar, src_ring, nentries); in ath10k_ce_alloc_src_ring_64()
1558 src_ring->base_addr_owner_space_unaligned, in ath10k_ce_alloc_src_ring_64()
1560 kfree(src_ring); in ath10k_ce_alloc_src_ring_64()
1565 return src_ring; in ath10k_ce_alloc_src_ring_64()
1723 if (ce_state->src_ring) { in _ath10k_ce_free_pipe()
1725 kfree(ce_state->src_ring->shadow_base_unaligned); in _ath10k_ce_free_pipe()
1727 (ce_state->src_ring->nentries * in _ath10k_ce_free_pipe()
1730 ce_state->src_ring->base_addr_owner_space, in _ath10k_ce_free_pipe()
1731 ce_state->src_ring->base_addr_ce_space); in _ath10k_ce_free_pipe()
1732 kfree(ce_state->src_ring); in _ath10k_ce_free_pipe()
1745 ce_state->src_ring = NULL; in _ath10k_ce_free_pipe()
1754 if (ce_state->src_ring) { in _ath10k_ce_free_pipe_64()
1756 kfree(ce_state->src_ring->shadow_base_unaligned); in _ath10k_ce_free_pipe_64()
1758 (ce_state->src_ring->nentries * in _ath10k_ce_free_pipe_64()
1761 ce_state->src_ring->base_addr_owner_space, in _ath10k_ce_free_pipe_64()
1762 ce_state->src_ring->base_addr_ce_space); in _ath10k_ce_free_pipe_64()
1763 kfree(ce_state->src_ring); in _ath10k_ce_free_pipe_64()
1776 ce_state->src_ring = NULL; in _ath10k_ce_free_pipe_64()
1904 ce_state->src_ring = in ath10k_ce_alloc_pipe()
1906 if (IS_ERR(ce_state->src_ring)) { in ath10k_ce_alloc_pipe()
1907 ret = PTR_ERR(ce_state->src_ring); in ath10k_ce_alloc_pipe()
1910 ce_state->src_ring = NULL; in ath10k_ce_alloc_pipe()