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 #ifndef EFX_MCDI_FUNCTIONS_H
11 #define EFX_MCDI_FUNCTIONS_H
12 
13 int efx_mcdi_alloc_vis(struct efx_nic *efx, unsigned int min_vis,
14 		       unsigned int max_vis, unsigned int *vi_base,
15 		       unsigned int *allocated_vis);
16 int efx_mcdi_free_vis(struct efx_nic *efx);
17 
18 int efx_mcdi_ev_probe(struct efx_channel *channel);
19 int efx_mcdi_ev_init(struct efx_channel *channel, bool v1_cut_thru, bool v2);
20 void efx_mcdi_ev_remove(struct efx_channel *channel);
21 void efx_mcdi_ev_fini(struct efx_channel *channel);
22 int efx_mcdi_tx_init(struct efx_tx_queue *tx_queue);
23 void efx_mcdi_tx_remove(struct efx_tx_queue *tx_queue);
24 void efx_mcdi_tx_fini(struct efx_tx_queue *tx_queue);
25 int efx_mcdi_rx_probe(struct efx_rx_queue *rx_queue);
26 void efx_mcdi_rx_init(struct efx_rx_queue *rx_queue);
27 void efx_mcdi_rx_remove(struct efx_rx_queue *rx_queue);
28 void efx_mcdi_rx_fini(struct efx_rx_queue *rx_queue);
29 int efx_fini_dmaq(struct efx_nic *efx);
30 int efx_mcdi_window_mode_to_stride(struct efx_nic *efx, u8 vi_window_mode);
31 int efx_get_pf_index(struct efx_nic *efx, unsigned int *pf_index);
32 
33 #endif
34