Lines Matching refs:channel
358 struct efx_channel *channel; in efx_ef10_link_piobufs() local
388 efx_for_each_channel(channel, efx) { in efx_ef10_link_piobufs()
389 efx_for_each_channel_tx_queue(tx_queue, channel) { in efx_ef10_link_piobufs()
395 tx_queue->channel->channel - 1) * in efx_ef10_link_piobufs()
1018 static void efx_ef10_push_irq_moderation(struct efx_channel *channel) in efx_ef10_push_irq_moderation() argument
1020 struct efx_nic *efx = channel->efx; in efx_ef10_push_irq_moderation()
1024 if (channel->irq_moderation) { in efx_ef10_push_irq_moderation()
1026 value = channel->irq_moderation - 1; in efx_ef10_push_irq_moderation()
1038 channel->channel); in efx_ef10_push_irq_moderation()
1043 channel->channel); in efx_ef10_push_irq_moderation()
1158 efx_schedule_channel_irq(efx->channel[context->index]); in efx_ef10_msi_interrupt()
1168 struct efx_channel *channel; in efx_ef10_legacy_interrupt() local
1184 efx_for_each_channel(channel, efx) { in efx_ef10_legacy_interrupt()
1186 efx_schedule_channel_irq(channel); in efx_ef10_legacy_interrupt()
1238 struct efx_channel *channel = tx_queue->channel; in efx_ef10_tx_init() local
1247 MCDI_SET_DWORD(inbuf, INIT_TXQ_IN_TARGET_EVQ, channel->channel); in efx_ef10_tx_init()
1502 struct efx_channel *channel = efx_rx_queue_channel(rx_queue); in efx_ef10_rx_init() local
1514 MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_TARGET_EVQ, channel->channel); in efx_ef10_rx_init()
1614 struct efx_channel *channel = efx_rx_queue_channel(rx_queue); in efx_ef10_rx_defer_refill() local
1622 MCDI_SET_DWORD(inbuf, DRIVER_EVENT_IN_EVQ, channel->channel); in efx_ef10_rx_defer_refill()
1630 efx_mcdi_rpc_async(channel->efx, MC_CMD_DRIVER_EVENT, in efx_ef10_rx_defer_refill()
1643 static int efx_ef10_ev_probe(struct efx_channel *channel) in efx_ef10_ev_probe() argument
1645 return efx_nic_alloc_buffer(channel->efx, &channel->eventq.buf, in efx_ef10_ev_probe()
1646 (channel->eventq_mask + 1) * in efx_ef10_ev_probe()
1651 static int efx_ef10_ev_init(struct efx_channel *channel) in efx_ef10_ev_init() argument
1657 size_t entries = channel->eventq.buf.len / EFX_BUF_SIZE; in efx_ef10_ev_init()
1658 struct efx_nic *efx = channel->efx; in efx_ef10_ev_init()
1672 memset(channel->eventq.buf.addr, 0xff, channel->eventq.buf.len); in efx_ef10_ev_init()
1674 MCDI_SET_DWORD(inbuf, INIT_EVQ_IN_SIZE, channel->eventq_mask + 1); in efx_ef10_ev_init()
1675 MCDI_SET_DWORD(inbuf, INIT_EVQ_IN_INSTANCE, channel->channel); in efx_ef10_ev_init()
1677 MCDI_SET_DWORD(inbuf, INIT_EVQ_IN_IRQ_NUM, channel->channel); in efx_ef10_ev_init()
1691 dma_addr = channel->eventq.buf.dma_addr; in efx_ef10_ev_init()
1705 static void efx_ef10_ev_fini(struct efx_channel *channel) in efx_ef10_ev_fini() argument
1709 struct efx_nic *efx = channel->efx; in efx_ef10_ev_fini()
1713 MCDI_SET_DWORD(inbuf, FINI_EVQ_IN_INSTANCE, channel->channel); in efx_ef10_ev_fini()
1728 static void efx_ef10_ev_remove(struct efx_channel *channel) in efx_ef10_ev_remove() argument
1730 efx_nic_free_buffer(channel->efx, &channel->eventq.buf); in efx_ef10_ev_remove()
1779 static int efx_ef10_handle_rx_event(struct efx_channel *channel, in efx_ef10_handle_rx_event() argument
1784 struct efx_nic *efx = channel->efx; in efx_ef10_handle_rx_event()
1804 rx_queue = efx_channel_get_rx_queue(channel); in efx_ef10_handle_rx_event()
1846 ++channel->n_rx_merge_events; in efx_ef10_handle_rx_event()
1847 channel->n_rx_merge_packets += n_packets; in efx_ef10_handle_rx_event()
1861 channel->n_rx_ip_hdr_chksum_err += n_packets; in efx_ef10_handle_rx_event()
1864 channel->n_rx_tcp_udp_chksum_err += n_packets; in efx_ef10_handle_rx_event()
1873 channel->irq_mod_score += 2 * n_packets; in efx_ef10_handle_rx_event()
1891 efx_ef10_handle_tx_event(struct efx_channel *channel, efx_qword_t *event) in efx_ef10_handle_tx_event() argument
1893 struct efx_nic *efx = channel->efx; in efx_ef10_handle_tx_event()
1908 tx_queue = efx_channel_get_tx_queue(channel, in efx_ef10_handle_tx_event()
1918 efx_ef10_handle_driver_event(struct efx_channel *channel, efx_qword_t *event) in efx_ef10_handle_driver_event() argument
1920 struct efx_nic *efx = channel->efx; in efx_ef10_handle_driver_event()
1936 channel->channel, subcode, in efx_ef10_handle_driver_event()
1942 static void efx_ef10_handle_driver_generated_event(struct efx_channel *channel, in efx_ef10_handle_driver_generated_event() argument
1945 struct efx_nic *efx = channel->efx; in efx_ef10_handle_driver_generated_event()
1952 channel->event_test_cpu = raw_smp_processor_id(); in efx_ef10_handle_driver_generated_event()
1959 efx_fast_push_rx_descriptors(&channel->rx_queue, true); in efx_ef10_handle_driver_generated_event()
1965 channel->channel, (unsigned) subcode, in efx_ef10_handle_driver_generated_event()
1970 static int efx_ef10_ev_process(struct efx_channel *channel, int quota) in efx_ef10_ev_process() argument
1972 struct efx_nic *efx = channel->efx; in efx_ef10_ev_process()
1982 read_ptr = channel->eventq_read_ptr; in efx_ef10_ev_process()
1985 p_event = efx_event(channel, read_ptr); in efx_ef10_ev_process()
1999 channel->channel, EFX_QWORD_VAL(event)); in efx_ef10_ev_process()
2003 efx_mcdi_process_event(channel, &event); in efx_ef10_ev_process()
2006 spent += efx_ef10_handle_rx_event(channel, &event); in efx_ef10_ev_process()
2016 tx_descs += efx_ef10_handle_tx_event(channel, &event); in efx_ef10_ev_process()
2025 efx_ef10_handle_driver_event(channel, &event); in efx_ef10_ev_process()
2030 efx_ef10_handle_driver_generated_event(channel, &event); in efx_ef10_ev_process()
2036 channel->channel, ev_code, in efx_ef10_ev_process()
2042 channel->eventq_read_ptr = read_ptr; in efx_ef10_ev_process()
2046 static void efx_ef10_ev_read_ack(struct efx_channel *channel) in efx_ef10_ev_read_ack() argument
2048 struct efx_nic *efx = channel->efx; in efx_ef10_ev_read_ack()
2060 (channel->eventq_read_ptr & in efx_ef10_ev_read_ack()
2061 channel->eventq_mask) >> in efx_ef10_ev_read_ack()
2064 channel->channel); in efx_ef10_ev_read_ack()
2068 channel->eventq_read_ptr & in efx_ef10_ev_read_ack()
2071 channel->channel); in efx_ef10_ev_read_ack()
2074 channel->eventq_read_ptr & in efx_ef10_ev_read_ack()
2075 channel->eventq_mask); in efx_ef10_ev_read_ack()
2076 efx_writed_page(efx, &rptr, ER_DZ_EVQ_RPTR, channel->channel); in efx_ef10_ev_read_ack()
2080 static void efx_ef10_ev_test_generate(struct efx_channel *channel) in efx_ef10_ev_test_generate() argument
2083 struct efx_nic *efx = channel->efx; in efx_ef10_ev_test_generate()
2091 MCDI_SET_DWORD(inbuf, DRIVER_EVENT_IN_EVQ, channel->channel); in efx_ef10_ev_test_generate()
2122 struct efx_channel *channel; in efx_ef10_fini_dmaq() local
2137 efx_for_each_channel(channel, efx) { in efx_ef10_fini_dmaq()
2138 efx_for_each_channel_rx_queue(rx_queue, channel) in efx_ef10_fini_dmaq()
2140 efx_for_each_channel_tx_queue(tx_queue, channel) in efx_ef10_fini_dmaq()
3499 static int efx_ef10_rx_enable_timestamping(struct efx_channel *channel, in efx_ef10_rx_enable_timestamping() argument
3505 if (channel->sync_events_state == SYNC_EVENTS_REQUESTED || in efx_ef10_rx_enable_timestamping()
3506 channel->sync_events_state == SYNC_EVENTS_VALID || in efx_ef10_rx_enable_timestamping()
3507 (temp && channel->sync_events_state == SYNC_EVENTS_DISABLED)) in efx_ef10_rx_enable_timestamping()
3509 channel->sync_events_state = SYNC_EVENTS_REQUESTED; in efx_ef10_rx_enable_timestamping()
3514 channel->channel); in efx_ef10_rx_enable_timestamping()
3516 rc = efx_mcdi_rpc(channel->efx, MC_CMD_PTP, in efx_ef10_rx_enable_timestamping()
3520 channel->sync_events_state = temp ? SYNC_EVENTS_QUIESCENT : in efx_ef10_rx_enable_timestamping()
3526 static int efx_ef10_rx_disable_timestamping(struct efx_channel *channel, in efx_ef10_rx_disable_timestamping() argument
3532 if (channel->sync_events_state == SYNC_EVENTS_DISABLED || in efx_ef10_rx_disable_timestamping()
3533 (temp && channel->sync_events_state == SYNC_EVENTS_QUIESCENT)) in efx_ef10_rx_disable_timestamping()
3535 if (channel->sync_events_state == SYNC_EVENTS_QUIESCENT) { in efx_ef10_rx_disable_timestamping()
3536 channel->sync_events_state = SYNC_EVENTS_DISABLED; in efx_ef10_rx_disable_timestamping()
3539 channel->sync_events_state = temp ? SYNC_EVENTS_QUIESCENT : in efx_ef10_rx_disable_timestamping()
3547 channel->channel); in efx_ef10_rx_disable_timestamping()
3549 rc = efx_mcdi_rpc(channel->efx, MC_CMD_PTP, in efx_ef10_rx_disable_timestamping()
3558 int (*set)(struct efx_channel *channel, bool temp); in efx_ef10_ptp_set_ts_sync_events()
3559 struct efx_channel *channel; in efx_ef10_ptp_set_ts_sync_events() local
3565 efx_for_each_channel(channel, efx) { in efx_ef10_ptp_set_ts_sync_events()
3566 int rc = set(channel, temp); in efx_ef10_ptp_set_ts_sync_events()