Lines Matching refs:src_ring
226 (ctrl1_addr & ~(ctrl_regs->src_ring->mask)) | in ath10k_ce_src_ring_byte_swap_set()
227 ath10k_set_ring_byte(n, ctrl_regs->src_ring)); in ath10k_ce_src_ring_byte_swap_set()
430 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in _ath10k_ce_send_nolock() local
432 unsigned int nentries_mask = src_ring->nentries_mask; in _ath10k_ce_send_nolock()
433 unsigned int sw_index = src_ring->sw_index; in _ath10k_ce_send_nolock()
434 unsigned int write_index = src_ring->write_index; in _ath10k_ce_send_nolock()
449 desc = CE_SRC_RING_TO_DESC(src_ring->base_addr_owner_space, in _ath10k_ce_send_nolock()
465 src_ring->per_transfer_context[write_index] = per_transfer_context; in _ath10k_ce_send_nolock()
474 src_ring->write_index = write_index; in _ath10k_ce_send_nolock()
487 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in _ath10k_ce_send_nolock_64() local
489 unsigned int nentries_mask = src_ring->nentries_mask; in _ath10k_ce_send_nolock_64()
491 unsigned int write_index = src_ring->write_index; in _ath10k_ce_send_nolock_64()
507 sw_index = src_ring->sw_index; in _ath10k_ce_send_nolock_64()
515 desc = CE_SRC_RING_TO_DESC_64(src_ring->base_addr_owner_space, in _ath10k_ce_send_nolock_64()
541 src_ring->per_transfer_context[write_index] = per_transfer_context; in _ath10k_ce_send_nolock_64()
555 src_ring->write_index = write_index; in _ath10k_ce_send_nolock_64()
576 struct ath10k_ce_ring *src_ring = pipe->src_ring; in __ath10k_ce_send_revert() local
586 if (WARN_ON_ONCE(src_ring->write_index == src_ring->sw_index)) in __ath10k_ce_send_revert()
589 if (WARN_ON_ONCE(src_ring->write_index == in __ath10k_ce_send_revert()
593 src_ring->write_index--; in __ath10k_ce_send_revert()
594 src_ring->write_index &= src_ring->nentries_mask; in __ath10k_ce_send_revert()
596 src_ring->per_transfer_context[src_ring->write_index] = NULL; in __ath10k_ce_send_revert()
627 delta = CE_RING_DELTA(pipe->src_ring->nentries_mask, in ath10k_ce_num_free_src_entries()
628 pipe->src_ring->write_index, in ath10k_ce_num_free_src_entries()
629 pipe->src_ring->sw_index - 1); in ath10k_ce_num_free_src_entries()
1006 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in _ath10k_ce_completed_send_next_nolock() local
1009 unsigned int nentries_mask = src_ring->nentries_mask; in _ath10k_ce_completed_send_next_nolock()
1010 unsigned int sw_index = src_ring->sw_index; in _ath10k_ce_completed_send_next_nolock()
1014 if (src_ring->hw_index == sw_index) { in _ath10k_ce_completed_send_next_nolock()
1028 src_ring->hw_index = read_index; in _ath10k_ce_completed_send_next_nolock()
1034 read_index = src_ring->hw_index; in _ath10k_ce_completed_send_next_nolock()
1041 src_ring->per_transfer_context[sw_index]; in _ath10k_ce_completed_send_next_nolock()
1044 src_ring->per_transfer_context[sw_index] = NULL; in _ath10k_ce_completed_send_next_nolock()
1045 desc = CE_SRC_RING_TO_DESC(src_ring->base_addr_owner_space, in _ath10k_ce_completed_send_next_nolock()
1051 src_ring->sw_index = sw_index; in _ath10k_ce_completed_send_next_nolock()
1059 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in _ath10k_ce_completed_send_next_nolock_64() local
1062 unsigned int nentries_mask = src_ring->nentries_mask; in _ath10k_ce_completed_send_next_nolock_64()
1063 unsigned int sw_index = src_ring->sw_index; in _ath10k_ce_completed_send_next_nolock_64()
1067 if (src_ring->hw_index == sw_index) { in _ath10k_ce_completed_send_next_nolock_64()
1081 src_ring->hw_index = read_index; in _ath10k_ce_completed_send_next_nolock_64()
1087 read_index = src_ring->hw_index; in _ath10k_ce_completed_send_next_nolock_64()
1094 src_ring->per_transfer_context[sw_index]; in _ath10k_ce_completed_send_next_nolock_64()
1097 src_ring->per_transfer_context[sw_index] = NULL; in _ath10k_ce_completed_send_next_nolock_64()
1098 desc = CE_SRC_RING_TO_DESC_64(src_ring->base_addr_owner_space, in _ath10k_ce_completed_send_next_nolock_64()
1104 src_ring->sw_index = sw_index; in _ath10k_ce_completed_send_next_nolock_64()
1118 struct ath10k_ce_ring *src_ring, in ath10k_ce_extract_desc_data() argument
1124 struct ce_desc *base = src_ring->base_addr_owner_space; in ath10k_ce_extract_desc_data()
1135 struct ath10k_ce_ring *src_ring, in ath10k_ce_extract_desc_data_64() argument
1141 struct ce_desc_64 *base = src_ring->base_addr_owner_space; in ath10k_ce_extract_desc_data_64()
1159 struct ath10k_ce_ring *src_ring; in ath10k_ce_cancel_send_next() local
1167 src_ring = ce_state->src_ring; in ath10k_ce_cancel_send_next()
1169 if (!src_ring) in ath10k_ce_cancel_send_next()
1177 nentries_mask = src_ring->nentries_mask; in ath10k_ce_cancel_send_next()
1178 sw_index = src_ring->sw_index; in ath10k_ce_cancel_send_next()
1179 write_index = src_ring->write_index; in ath10k_ce_cancel_send_next()
1182 ce_state->ops->ce_extract_desc_data(ar, src_ring, sw_index, in ath10k_ce_cancel_send_next()
1188 src_ring->per_transfer_context[sw_index]; in ath10k_ce_cancel_send_next()
1191 src_ring->per_transfer_context[sw_index] = NULL; in ath10k_ce_cancel_send_next()
1195 src_ring->sw_index = sw_index; in ath10k_ce_cancel_send_next()
1362 struct ath10k_ce_ring *src_ring = ce_state->src_ring; in ath10k_ce_init_src_ring() local
1368 memset(src_ring->base_addr_owner_space, 0, in ath10k_ce_init_src_ring()
1371 memset(src_ring->base_addr_owner_space, 0, in ath10k_ce_init_src_ring()
1374 src_ring->sw_index = ath10k_ce_src_ring_read_index_get(ar, ctrl_addr); in ath10k_ce_init_src_ring()
1375 src_ring->sw_index &= src_ring->nentries_mask; in ath10k_ce_init_src_ring()
1376 src_ring->hw_index = src_ring->sw_index; in ath10k_ce_init_src_ring()
1378 src_ring->write_index = in ath10k_ce_init_src_ring()
1380 src_ring->write_index &= src_ring->nentries_mask; in ath10k_ce_init_src_ring()
1383 src_ring->base_addr_ce_space); in ath10k_ce_init_src_ring()
1392 ce_id, nentries, src_ring->base_addr_owner_space); in ath10k_ce_init_src_ring()
1436 struct ath10k_ce_ring *src_ring, in ath10k_ce_alloc_shadow_base() argument
1439 src_ring->shadow_base_unaligned = kcalloc(nentries, in ath10k_ce_alloc_shadow_base()
1442 if (!src_ring->shadow_base_unaligned) in ath10k_ce_alloc_shadow_base()
1445 src_ring->shadow_base = (struct ce_desc_64 *) in ath10k_ce_alloc_shadow_base()
1446 PTR_ALIGN(src_ring->shadow_base_unaligned, in ath10k_ce_alloc_shadow_base()
1455 struct ath10k_ce_ring *src_ring; in ath10k_ce_alloc_src_ring() local
1462 src_ring = kzalloc(struct_size(src_ring, per_transfer_context, in ath10k_ce_alloc_src_ring()
1464 if (src_ring == NULL) in ath10k_ce_alloc_src_ring()
1467 src_ring->nentries = nentries; in ath10k_ce_alloc_src_ring()
1468 src_ring->nentries_mask = nentries - 1; in ath10k_ce_alloc_src_ring()
1474 src_ring->base_addr_owner_space_unaligned = in ath10k_ce_alloc_src_ring()
1479 if (!src_ring->base_addr_owner_space_unaligned) { in ath10k_ce_alloc_src_ring()
1480 kfree(src_ring); in ath10k_ce_alloc_src_ring()
1484 src_ring->base_addr_ce_space_unaligned = base_addr; in ath10k_ce_alloc_src_ring()
1486 src_ring->base_addr_owner_space = in ath10k_ce_alloc_src_ring()
1487 PTR_ALIGN(src_ring->base_addr_owner_space_unaligned, in ath10k_ce_alloc_src_ring()
1489 src_ring->base_addr_ce_space = in ath10k_ce_alloc_src_ring()
1490 ALIGN(src_ring->base_addr_ce_space_unaligned, in ath10k_ce_alloc_src_ring()
1494 ret = ath10k_ce_alloc_shadow_base(ar, src_ring, nentries); in ath10k_ce_alloc_src_ring()
1499 src_ring->base_addr_owner_space_unaligned, in ath10k_ce_alloc_src_ring()
1501 kfree(src_ring); in ath10k_ce_alloc_src_ring()
1506 return src_ring; in ath10k_ce_alloc_src_ring()
1513 struct ath10k_ce_ring *src_ring; in ath10k_ce_alloc_src_ring_64() local
1520 src_ring = kzalloc(struct_size(src_ring, per_transfer_context, in ath10k_ce_alloc_src_ring_64()
1522 if (!src_ring) in ath10k_ce_alloc_src_ring_64()
1525 src_ring->nentries = nentries; in ath10k_ce_alloc_src_ring_64()
1526 src_ring->nentries_mask = nentries - 1; in ath10k_ce_alloc_src_ring_64()
1531 src_ring->base_addr_owner_space_unaligned = in ath10k_ce_alloc_src_ring_64()
1536 if (!src_ring->base_addr_owner_space_unaligned) { in ath10k_ce_alloc_src_ring_64()
1537 kfree(src_ring); in ath10k_ce_alloc_src_ring_64()
1541 src_ring->base_addr_ce_space_unaligned = base_addr; in ath10k_ce_alloc_src_ring_64()
1543 src_ring->base_addr_owner_space = in ath10k_ce_alloc_src_ring_64()
1544 PTR_ALIGN(src_ring->base_addr_owner_space_unaligned, in ath10k_ce_alloc_src_ring_64()
1546 src_ring->base_addr_ce_space = in ath10k_ce_alloc_src_ring_64()
1547 ALIGN(src_ring->base_addr_ce_space_unaligned, in ath10k_ce_alloc_src_ring_64()
1551 ret = ath10k_ce_alloc_shadow_base(ar, src_ring, nentries); in ath10k_ce_alloc_src_ring_64()
1556 src_ring->base_addr_owner_space_unaligned, in ath10k_ce_alloc_src_ring_64()
1558 kfree(src_ring); in ath10k_ce_alloc_src_ring_64()
1563 return src_ring; in ath10k_ce_alloc_src_ring_64()
1721 if (ce_state->src_ring) { in _ath10k_ce_free_pipe()
1723 kfree(ce_state->src_ring->shadow_base_unaligned); in _ath10k_ce_free_pipe()
1725 (ce_state->src_ring->nentries * in _ath10k_ce_free_pipe()
1728 ce_state->src_ring->base_addr_owner_space, in _ath10k_ce_free_pipe()
1729 ce_state->src_ring->base_addr_ce_space); in _ath10k_ce_free_pipe()
1730 kfree(ce_state->src_ring); in _ath10k_ce_free_pipe()
1743 ce_state->src_ring = NULL; in _ath10k_ce_free_pipe()
1752 if (ce_state->src_ring) { in _ath10k_ce_free_pipe_64()
1754 kfree(ce_state->src_ring->shadow_base_unaligned); in _ath10k_ce_free_pipe_64()
1756 (ce_state->src_ring->nentries * in _ath10k_ce_free_pipe_64()
1759 ce_state->src_ring->base_addr_owner_space, in _ath10k_ce_free_pipe_64()
1760 ce_state->src_ring->base_addr_ce_space); in _ath10k_ce_free_pipe_64()
1761 kfree(ce_state->src_ring); in _ath10k_ce_free_pipe_64()
1774 ce_state->src_ring = NULL; in _ath10k_ce_free_pipe_64()
1902 ce_state->src_ring = in ath10k_ce_alloc_pipe()
1904 if (IS_ERR(ce_state->src_ring)) { in ath10k_ce_alloc_pipe()
1905 ret = PTR_ERR(ce_state->src_ring); in ath10k_ce_alloc_pipe()
1908 ce_state->src_ring = NULL; in ath10k_ce_alloc_pipe()