Lines Matching refs:channel

523 	struct efx_channel *channel;  in efx_ef10_link_piobufs()  local
555 efx_for_each_channel(channel, efx) { in efx_ef10_link_piobufs()
556 efx_for_each_channel_tx_queue(tx_queue, channel) { in efx_ef10_link_piobufs()
562 tx_queue->channel->channel - 1) * in efx_ef10_link_piobufs()
624 struct efx_channel *channel; in efx_ef10_forget_old_piobufs() local
628 efx_for_each_channel(channel, efx) in efx_ef10_forget_old_piobufs()
629 efx_for_each_channel_tx_queue(tx_queue, channel) in efx_ef10_forget_old_piobufs()
1530 static void efx_ef10_push_irq_moderation(struct efx_channel *channel) in efx_ef10_push_irq_moderation() argument
1532 struct efx_nic *efx = channel->efx; in efx_ef10_push_irq_moderation()
1536 if (channel->irq_moderation) { in efx_ef10_push_irq_moderation()
1538 value = channel->irq_moderation - 1; in efx_ef10_push_irq_moderation()
1550 channel->channel); in efx_ef10_push_irq_moderation()
1555 channel->channel); in efx_ef10_push_irq_moderation()
1684 efx_schedule_channel_irq(efx->channel[context->index]); in efx_ef10_msi_interrupt()
1694 struct efx_channel *channel; in efx_ef10_legacy_interrupt() local
1710 efx_for_each_channel(channel, efx) { in efx_ef10_legacy_interrupt()
1712 efx_schedule_channel_irq(channel); in efx_ef10_legacy_interrupt()
1763 struct efx_channel *channel = tx_queue->channel; in efx_ef10_tx_init() local
1774 MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_TARGET_EVQ, channel->channel); in efx_ef10_tx_init()
2138 struct efx_channel *channel = efx_rx_queue_channel(rx_queue); in efx_ef10_rx_init() local
2152 MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_TARGET_EVQ, channel->channel); in efx_ef10_rx_init()
2252 struct efx_channel *channel = efx_rx_queue_channel(rx_queue); in efx_ef10_rx_defer_refill() local
2260 MCDI_SET_DWORD(inbuf, DRIVER_EVENT_IN_EVQ, channel->channel); in efx_ef10_rx_defer_refill()
2268 efx_mcdi_rpc_async(channel->efx, MC_CMD_DRIVER_EVENT, in efx_ef10_rx_defer_refill()
2281 static int efx_ef10_ev_probe(struct efx_channel *channel) in efx_ef10_ev_probe() argument
2283 return efx_nic_alloc_buffer(channel->efx, &channel->eventq.buf, in efx_ef10_ev_probe()
2284 (channel->eventq_mask + 1) * in efx_ef10_ev_probe()
2289 static void efx_ef10_ev_fini(struct efx_channel *channel) in efx_ef10_ev_fini() argument
2293 struct efx_nic *efx = channel->efx; in efx_ef10_ev_fini()
2297 MCDI_SET_DWORD(inbuf, FINI_EVQ_IN_INSTANCE, channel->channel); in efx_ef10_ev_fini()
2312 static int efx_ef10_ev_init(struct efx_channel *channel) in efx_ef10_ev_init() argument
2318 size_t entries = channel->eventq.buf.len / EFX_BUF_SIZE; in efx_ef10_ev_init()
2319 struct efx_nic *efx = channel->efx; in efx_ef10_ev_init()
2334 memset(channel->eventq.buf.addr, 0xff, channel->eventq.buf.len); in efx_ef10_ev_init()
2336 MCDI_SET_DWORD(inbuf, INIT_EVQ_IN_SIZE, channel->eventq_mask + 1); in efx_ef10_ev_init()
2337 MCDI_SET_DWORD(inbuf, INIT_EVQ_IN_INSTANCE, channel->channel); in efx_ef10_ev_init()
2339 MCDI_SET_DWORD(inbuf, INIT_EVQ_IN_IRQ_NUM, channel->channel); in efx_ef10_ev_init()
2353 dma_addr = channel->eventq.buf.dma_addr; in efx_ef10_ev_init()
2364 if (channel->channel || rc) in efx_ef10_ev_init()
2408 efx_ef10_ev_fini(channel); in efx_ef10_ev_init()
2412 static void efx_ef10_ev_remove(struct efx_channel *channel) in efx_ef10_ev_remove() argument
2414 efx_nic_free_buffer(channel->efx, &channel->eventq.buf); in efx_ef10_ev_remove()
2463 static int efx_ef10_handle_rx_event(struct efx_channel *channel, in efx_ef10_handle_rx_event() argument
2468 struct efx_nic *efx = channel->efx; in efx_ef10_handle_rx_event()
2488 rx_queue = efx_channel_get_rx_queue(channel); in efx_ef10_handle_rx_event()
2530 ++channel->n_rx_merge_events; in efx_ef10_handle_rx_event()
2531 channel->n_rx_merge_packets += n_packets; in efx_ef10_handle_rx_event()
2545 channel->n_rx_ip_hdr_chksum_err += n_packets; in efx_ef10_handle_rx_event()
2548 channel->n_rx_tcp_udp_chksum_err += n_packets; in efx_ef10_handle_rx_event()
2557 channel->irq_mod_score += 2 * n_packets; in efx_ef10_handle_rx_event()
2575 efx_ef10_handle_tx_event(struct efx_channel *channel, efx_qword_t *event) in efx_ef10_handle_tx_event() argument
2577 struct efx_nic *efx = channel->efx; in efx_ef10_handle_tx_event()
2592 tx_queue = efx_channel_get_tx_queue(channel, in efx_ef10_handle_tx_event()
2602 efx_ef10_handle_driver_event(struct efx_channel *channel, efx_qword_t *event) in efx_ef10_handle_driver_event() argument
2604 struct efx_nic *efx = channel->efx; in efx_ef10_handle_driver_event()
2620 channel->channel, subcode, in efx_ef10_handle_driver_event()
2626 static void efx_ef10_handle_driver_generated_event(struct efx_channel *channel, in efx_ef10_handle_driver_generated_event() argument
2629 struct efx_nic *efx = channel->efx; in efx_ef10_handle_driver_generated_event()
2636 channel->event_test_cpu = raw_smp_processor_id(); in efx_ef10_handle_driver_generated_event()
2643 efx_fast_push_rx_descriptors(&channel->rx_queue, true); in efx_ef10_handle_driver_generated_event()
2649 channel->channel, (unsigned) subcode, in efx_ef10_handle_driver_generated_event()
2654 static int efx_ef10_ev_process(struct efx_channel *channel, int quota) in efx_ef10_ev_process() argument
2656 struct efx_nic *efx = channel->efx; in efx_ef10_ev_process()
2666 read_ptr = channel->eventq_read_ptr; in efx_ef10_ev_process()
2669 p_event = efx_event(channel, read_ptr); in efx_ef10_ev_process()
2683 channel->channel, EFX_QWORD_VAL(event)); in efx_ef10_ev_process()
2687 efx_mcdi_process_event(channel, &event); in efx_ef10_ev_process()
2690 spent += efx_ef10_handle_rx_event(channel, &event); in efx_ef10_ev_process()
2700 tx_descs += efx_ef10_handle_tx_event(channel, &event); in efx_ef10_ev_process()
2709 efx_ef10_handle_driver_event(channel, &event); in efx_ef10_ev_process()
2714 efx_ef10_handle_driver_generated_event(channel, &event); in efx_ef10_ev_process()
2720 channel->channel, ev_code, in efx_ef10_ev_process()
2726 channel->eventq_read_ptr = read_ptr; in efx_ef10_ev_process()
2730 static void efx_ef10_ev_read_ack(struct efx_channel *channel) in efx_ef10_ev_read_ack() argument
2732 struct efx_nic *efx = channel->efx; in efx_ef10_ev_read_ack()
2744 (channel->eventq_read_ptr & in efx_ef10_ev_read_ack()
2745 channel->eventq_mask) >> in efx_ef10_ev_read_ack()
2748 channel->channel); in efx_ef10_ev_read_ack()
2752 channel->eventq_read_ptr & in efx_ef10_ev_read_ack()
2755 channel->channel); in efx_ef10_ev_read_ack()
2758 channel->eventq_read_ptr & in efx_ef10_ev_read_ack()
2759 channel->eventq_mask); in efx_ef10_ev_read_ack()
2760 efx_writed_page(efx, &rptr, ER_DZ_EVQ_RPTR, channel->channel); in efx_ef10_ev_read_ack()
2764 static void efx_ef10_ev_test_generate(struct efx_channel *channel) in efx_ef10_ev_test_generate() argument
2767 struct efx_nic *efx = channel->efx; in efx_ef10_ev_test_generate()
2775 MCDI_SET_DWORD(inbuf, DRIVER_EVENT_IN_EVQ, channel->channel); in efx_ef10_ev_test_generate()
2806 struct efx_channel *channel; in efx_ef10_fini_dmaq() local
2821 efx_for_each_channel(channel, efx) { in efx_ef10_fini_dmaq()
2822 efx_for_each_channel_rx_queue(rx_queue, channel) in efx_ef10_fini_dmaq()
2824 efx_for_each_channel_tx_queue(tx_queue, channel) in efx_ef10_fini_dmaq()
4544 static int efx_ef10_rx_enable_timestamping(struct efx_channel *channel, in efx_ef10_rx_enable_timestamping() argument
4550 if (channel->sync_events_state == SYNC_EVENTS_REQUESTED || in efx_ef10_rx_enable_timestamping()
4551 channel->sync_events_state == SYNC_EVENTS_VALID || in efx_ef10_rx_enable_timestamping()
4552 (temp && channel->sync_events_state == SYNC_EVENTS_DISABLED)) in efx_ef10_rx_enable_timestamping()
4554 channel->sync_events_state = SYNC_EVENTS_REQUESTED; in efx_ef10_rx_enable_timestamping()
4559 channel->channel); in efx_ef10_rx_enable_timestamping()
4561 rc = efx_mcdi_rpc(channel->efx, MC_CMD_PTP, in efx_ef10_rx_enable_timestamping()
4565 channel->sync_events_state = temp ? SYNC_EVENTS_QUIESCENT : in efx_ef10_rx_enable_timestamping()
4571 static int efx_ef10_rx_disable_timestamping(struct efx_channel *channel, in efx_ef10_rx_disable_timestamping() argument
4577 if (channel->sync_events_state == SYNC_EVENTS_DISABLED || in efx_ef10_rx_disable_timestamping()
4578 (temp && channel->sync_events_state == SYNC_EVENTS_QUIESCENT)) in efx_ef10_rx_disable_timestamping()
4580 if (channel->sync_events_state == SYNC_EVENTS_QUIESCENT) { in efx_ef10_rx_disable_timestamping()
4581 channel->sync_events_state = SYNC_EVENTS_DISABLED; in efx_ef10_rx_disable_timestamping()
4584 channel->sync_events_state = temp ? SYNC_EVENTS_QUIESCENT : in efx_ef10_rx_disable_timestamping()
4592 channel->channel); in efx_ef10_rx_disable_timestamping()
4594 rc = efx_mcdi_rpc(channel->efx, MC_CMD_PTP, in efx_ef10_rx_disable_timestamping()
4603 int (*set)(struct efx_channel *channel, bool temp); in efx_ef10_ptp_set_ts_sync_events()
4604 struct efx_channel *channel; in efx_ef10_ptp_set_ts_sync_events() local
4610 efx_for_each_channel(channel, efx) { in efx_ef10_ptp_set_ts_sync_events()
4611 int rc = set(channel, temp); in efx_ef10_ptp_set_ts_sync_events()