xref: /linux/drivers/net/ethernet/sfc/efx_channels.h (revision 37744feebc086908fd89760650f458ab19071750)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /****************************************************************************
3  * Driver for Solarflare network controllers and boards
4  * Copyright 2018 Solarflare Communications Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 as published
8  * by the Free Software Foundation, incorporated herein by reference.
9  */
10 
11 #ifndef EFX_CHANNELS_H
12 #define EFX_CHANNELS_H
13 
14 int efx_probe_interrupts(struct efx_nic *efx);
15 void efx_remove_interrupts(struct efx_nic *efx);
16 int efx_soft_enable_interrupts(struct efx_nic *efx);
17 void efx_soft_disable_interrupts(struct efx_nic *efx);
18 int efx_enable_interrupts(struct efx_nic *efx);
19 void efx_disable_interrupts(struct efx_nic *efx);
20 
21 void efx_set_interrupt_affinity(struct efx_nic *efx);
22 void efx_clear_interrupt_affinity(struct efx_nic *efx);
23 
24 int efx_probe_eventq(struct efx_channel *channel);
25 int efx_init_eventq(struct efx_channel *channel);
26 void efx_start_eventq(struct efx_channel *channel);
27 void efx_stop_eventq(struct efx_channel *channel);
28 void efx_fini_eventq(struct efx_channel *channel);
29 void efx_remove_eventq(struct efx_channel *channel);
30 
31 struct efx_channel *
32 efx_alloc_channel(struct efx_nic *efx, int i, struct efx_channel *old_channel);
33 int efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries);
34 void efx_get_channel_name(struct efx_channel *channel, char *buf, size_t len);
35 void efx_set_channel_names(struct efx_nic *efx);
36 int efx_init_channels(struct efx_nic *efx);
37 int efx_probe_channels(struct efx_nic *efx);
38 int efx_set_channels(struct efx_nic *efx);
39 bool efx_default_channel_want_txqs(struct efx_channel *channel);
40 void efx_remove_channel(struct efx_channel *channel);
41 void efx_remove_channels(struct efx_nic *efx);
42 void efx_fini_channels(struct efx_nic *efx);
43 struct efx_channel *efx_copy_channel(const struct efx_channel *old_channel);
44 void efx_start_channels(struct efx_nic *efx);
45 void efx_stop_channels(struct efx_nic *efx);
46 
47 void efx_init_napi_channel(struct efx_channel *channel);
48 void efx_init_napi(struct efx_nic *efx);
49 void efx_fini_napi_channel(struct efx_channel *channel);
50 void efx_fini_napi(struct efx_nic *efx);
51 
52 int efx_channel_dummy_op_int(struct efx_channel *channel);
53 void efx_channel_dummy_op_void(struct efx_channel *channel);
54 
55 #endif
56