Lines Matching refs:ctx_data
388 unsigned int state = s->ctx_data.rx.data_block_state; in pool_ideal_nonblocking_data_blocks()
422 s->ctx_data.rx.data_block_state = state; in pool_ideal_nonblocking_data_blocks()
468 unsigned int last = s->ctx_data.rx.last_syt_offset; in pool_ideal_syt_offsets()
469 unsigned int state = s->ctx_data.rx.syt_offset_state; in pool_ideal_syt_offsets()
480 s->ctx_data.rx.last_syt_offset = last; in pool_ideal_syt_offsets()
481 s->ctx_data.rx.syt_offset_state = state; in pool_ideal_syt_offsets()
511 const unsigned int cache_size = s->ctx_data.tx.cache.size; in calculate_cached_cycle_count()
512 unsigned int cycles = s->ctx_data.tx.cache.pos; in calculate_cached_cycle_count()
524 const unsigned int cache_size = s->ctx_data.tx.cache.size; in cache_seq()
525 struct seq_desc *cache = s->ctx_data.tx.cache.descs; in cache_seq()
526 unsigned int cache_pos = s->ctx_data.tx.cache.pos; in cache_seq()
543 s->ctx_data.tx.cache.pos = cache_pos; in cache_seq()
560 struct amdtp_stream *target = s->ctx_data.rx.replay_target; in pool_replayed_seq()
561 const struct seq_desc *cache = target->ctx_data.tx.cache.descs; in pool_replayed_seq()
562 const unsigned int cache_size = target->ctx_data.tx.cache.size; in pool_replayed_seq()
563 unsigned int cache_pos = s->ctx_data.rx.cache_pos; in pool_replayed_seq()
572 s->ctx_data.rx.cache_pos = cache_pos; in pool_replayed_seq()
582 if (!d->replay.enable || !s->ctx_data.rx.replay_target) { in pool_seq_descs()
588 struct amdtp_stream *tx = s->ctx_data.rx.replay_target; in pool_seq_descs()
589 const unsigned int cache_size = tx->ctx_data.tx.cache.size; in pool_seq_descs()
590 const unsigned int cache_pos = s->ctx_data.rx.cache_pos; in pool_seq_descs()
686 params->header_length = s->ctx_data.tx.ctx_header_size; in queue_in_packet()
687 params->payload_length = s->ctx_data.tx.max_ctx_payload_length; in queue_in_packet()
701 ((s->ctx_data.rx.fdf << CIP_FDF_SHIFT) & CIP_FDF_MASK) | in generate_cip_header()
802 if (*data_blocks > 0 && s->ctx_data.tx.dbc_interval > 0) in check_cip_header()
803 dbc_interval = s->ctx_data.tx.dbc_interval; in check_cip_header()
846 if (payload_length > cip_header_size + s->ctx_data.tx.max_ctx_payload_length) { in parse_ir_ctx_header()
849 payload_length, cip_header_size + s->ctx_data.tx.max_ctx_payload_length); in parse_ir_ctx_header()
1009 ctx_header += s->ctx_data.tx.ctx_header_size / sizeof(*ctx_header); in generate_tx_packet_descs()
1033 struct seq_desc *seq_descs = s->ctx_data.rx.seq.descs; in generate_rx_packet_descs()
1034 unsigned int seq_size = s->ctx_data.rx.seq.size; in generate_rx_packet_descs()
1035 unsigned int seq_pos = s->ctx_data.rx.seq.pos; in generate_rx_packet_descs()
1072 s->ctx_data.rx.seq.pos = seq_pos; in generate_rx_packet_descs()
1178 unsigned int event_count = s->ctx_data.rx.event_count; in process_rx_packets()
1238 s->ctx_data.rx.event_count = event_count; in process_rx_packets()
1318 s->ctx_data.rx.cache_pos = 0; in process_rx_packets_intermediately()
1346 packet_count = header_length / s->ctx_data.tx.ctx_header_size; in process_tx_packets()
1390 packets = header_length / s->ctx_data.tx.ctx_header_size; in drop_tx_packets()
1392 ctx_header += (packets - 1) * s->ctx_data.tx.ctx_header_size / sizeof(*ctx_header); in drop_tx_packets()
1418 packets = header_length / s->ctx_data.tx.ctx_header_size; in process_tx_packets_intermediately()
1428 ctx_header += s->ctx_data.tx.ctx_header_size / sizeof(__be32); in process_tx_packets_intermediately()
1435 size_t length = s->ctx_data.tx.ctx_header_size * offset; in process_tx_packets_intermediately()
1470 count = header_length / s->ctx_data.tx.ctx_header_size; in drop_tx_packets_initially()
1507 ctx_header += s->ctx_data.tx.ctx_header_size / sizeof(__be32); in drop_tx_packets_initially()
1513 s->ctx_data.tx.event_starts = true; in drop_tx_packets_initially()
1524 if (s->ctx_data.tx.event_starts) in drop_tx_packets_initially()
1616 tx = rx->ctx_data.rx.replay_target; in irq_target_callback_skip()
1618 if (cached_cycles > tx->ctx_data.tx.cache.size / 2) in irq_target_callback_skip()
1745 s->ctx_data.tx.max_ctx_payload_length = max_ctx_payload_size; in amdtp_stream_start()
1746 s->ctx_data.tx.ctx_header_size = ctx_header_size; in amdtp_stream_start()
1747 s->ctx_data.tx.event_starts = false; in amdtp_stream_start()
1752 s->ctx_data.tx.cache.size = max_t(unsigned int, s->syt_interval * 2, in amdtp_stream_start()
1754 s->ctx_data.tx.cache.pos = 0; in amdtp_stream_start()
1755 s->ctx_data.tx.cache.descs = kcalloc(s->ctx_data.tx.cache.size, in amdtp_stream_start()
1756 sizeof(*s->ctx_data.tx.cache.descs), GFP_KERNEL); in amdtp_stream_start()
1757 if (!s->ctx_data.tx.cache.descs) { in amdtp_stream_start()
1776 s->ctx_data.rx.seq.descs = kcalloc(queue_size, sizeof(*s->ctx_data.rx.seq.descs), GFP_KERNEL); in amdtp_stream_start()
1777 if (!s->ctx_data.rx.seq.descs) { in amdtp_stream_start()
1781 s->ctx_data.rx.seq.size = queue_size; in amdtp_stream_start()
1782 s->ctx_data.rx.seq.pos = 0; in amdtp_stream_start()
1785 s->ctx_data.rx.data_block_state = entry->data_block; in amdtp_stream_start()
1786 s->ctx_data.rx.syt_offset_state = entry->syt_offset; in amdtp_stream_start()
1787 s->ctx_data.rx.last_syt_offset = TICKS_PER_CYCLE; in amdtp_stream_start()
1789 s->ctx_data.rx.event_count = 0; in amdtp_stream_start()
1857 kfree(s->ctx_data.rx.seq.descs); in amdtp_stream_start()
1860 kfree(s->ctx_data.tx.cache.descs); in amdtp_stream_start()
1953 kfree(s->ctx_data.rx.seq.descs); in amdtp_stream_stop()
1956 kfree(s->ctx_data.tx.cache.descs); in amdtp_stream_stop()
2068 rx->ctx_data.rx.replay_target = tx; in make_association()