Lines Matching refs:channel

231 	struct efx_channel *channel;  member
427 int channel; member
482 static inline void efx_channel_busy_poll_init(struct efx_channel *channel) in efx_channel_busy_poll_init() argument
484 WRITE_ONCE(channel->busy_poll_state, EFX_CHANNEL_STATE_IDLE); in efx_channel_busy_poll_init()
488 static inline bool efx_channel_lock_napi(struct efx_channel *channel) in efx_channel_lock_napi() argument
490 unsigned long prev, old = READ_ONCE(channel->busy_poll_state); in efx_channel_lock_napi()
497 &channel->busy_poll_state); in efx_channel_lock_napi()
504 prev = cmpxchg(&channel->busy_poll_state, old, in efx_channel_lock_napi()
517 static inline void efx_channel_unlock_napi(struct efx_channel *channel) in efx_channel_unlock_napi() argument
521 WRITE_ONCE(channel->busy_poll_state, EFX_CHANNEL_STATE_IDLE); in efx_channel_unlock_napi()
525 static inline bool efx_channel_try_lock_poll(struct efx_channel *channel) in efx_channel_try_lock_poll() argument
527 return cmpxchg(&channel->busy_poll_state, EFX_CHANNEL_STATE_IDLE, in efx_channel_try_lock_poll()
531 static inline void efx_channel_unlock_poll(struct efx_channel *channel) in efx_channel_unlock_poll() argument
533 clear_bit_unlock(EFX_CHANNEL_STATE_POLL_BIT, &channel->busy_poll_state); in efx_channel_unlock_poll()
536 static inline bool efx_channel_busy_polling(struct efx_channel *channel) in efx_channel_busy_polling() argument
538 return test_bit(EFX_CHANNEL_STATE_POLL_BIT, &channel->busy_poll_state); in efx_channel_busy_polling()
541 static inline void efx_channel_enable(struct efx_channel *channel) in efx_channel_enable() argument
544 &channel->busy_poll_state); in efx_channel_enable()
550 static inline bool efx_channel_disable(struct efx_channel *channel) in efx_channel_disable() argument
552 set_bit(EFX_CHANNEL_STATE_DISABLE_BIT, &channel->busy_poll_state); in efx_channel_disable()
554 return !efx_channel_busy_polling(channel); in efx_channel_disable()
559 static inline void efx_channel_busy_poll_init(struct efx_channel *channel) in efx_channel_busy_poll_init() argument
563 static inline bool efx_channel_lock_napi(struct efx_channel *channel) in efx_channel_lock_napi() argument
568 static inline void efx_channel_unlock_napi(struct efx_channel *channel) in efx_channel_unlock_napi() argument
572 static inline bool efx_channel_try_lock_poll(struct efx_channel *channel) in efx_channel_try_lock_poll() argument
577 static inline void efx_channel_unlock_poll(struct efx_channel *channel) in efx_channel_unlock_poll() argument
581 static inline bool efx_channel_busy_polling(struct efx_channel *channel) in efx_channel_busy_polling() argument
586 static inline void efx_channel_enable(struct efx_channel *channel) in efx_channel_enable() argument
590 static inline bool efx_channel_disable(struct efx_channel *channel) in efx_channel_disable() argument
944 struct efx_channel *channel[EFX_MAX_CHANNELS]; member
1235 bool (*handle_global_event)(struct efx_channel *channel, efx_qword_t *);
1248 void (*push_irq_moderation)(struct efx_channel *channel);
1282 int (*ev_probe)(struct efx_channel *channel);
1283 int (*ev_init)(struct efx_channel *channel);
1284 void (*ev_fini)(struct efx_channel *channel);
1285 void (*ev_remove)(struct efx_channel *channel);
1286 int (*ev_process)(struct efx_channel *channel, int quota);
1287 void (*ev_read_ack)(struct efx_channel *channel);
1288 void (*ev_test_generate)(struct efx_channel *channel);
1383 return efx->channel[index]; in efx_get_channel()
1388 for (_channel = (_efx)->channel[0]; \
1390 _channel = (_channel->channel + 1 < (_efx)->n_channels) ? \
1391 (_efx)->channel[_channel->channel + 1] : NULL)
1395 for (_channel = (_efx)->channel[(_efx)->n_channels - 1]; \
1397 _channel = _channel->channel ? \
1398 (_efx)->channel[_channel->channel - 1] : NULL)
1405 return &efx->channel[efx->tx_channel_offset + index]->tx_queue[type]; in efx_get_tx_queue()
1408 static inline bool efx_channel_has_tx_queues(struct efx_channel *channel) in efx_channel_has_tx_queues() argument
1410 return channel->channel - channel->efx->tx_channel_offset < in efx_channel_has_tx_queues()
1411 channel->efx->n_tx_channels; in efx_channel_has_tx_queues()
1415 efx_channel_get_tx_queue(struct efx_channel *channel, unsigned type) in efx_channel_get_tx_queue() argument
1417 EFX_BUG_ON_PARANOID(!efx_channel_has_tx_queues(channel) || in efx_channel_get_tx_queue()
1419 return &channel->tx_queue[type]; in efx_channel_get_tx_queue()
1447 static inline bool efx_channel_has_rx_queue(struct efx_channel *channel) in efx_channel_has_rx_queue() argument
1449 return channel->rx_queue.core_index >= 0; in efx_channel_has_rx_queue()
1453 efx_channel_get_rx_queue(struct efx_channel *channel) in efx_channel_get_rx_queue() argument
1455 EFX_BUG_ON_PARANOID(!efx_channel_has_rx_queue(channel)); in efx_channel_get_rx_queue()
1456 return &channel->rx_queue; in efx_channel_get_rx_queue()
1476 return efx_rx_queue_channel(rx_queue)->channel; in efx_rx_queue_index()