spi: txx9: Let spi core handle validating transfer length
[cascardo/linux.git] / drivers / net / ethernet / intel / i40evf / i40e_prototype.h
1 /*******************************************************************************
2  *
3  * Intel Ethernet Controller XL710 Family Linux Virtual Function Driver
4  * Copyright(c) 2013 Intel Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms and conditions of the GNU General Public License,
8  * version 2, as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13  * more details.
14  *
15  * The full GNU General Public License is included in this distribution in
16  * the file called "COPYING".
17  *
18  * Contact Information:
19  * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
20  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
21  *
22  ******************************************************************************/
23
24 #ifndef _I40E_PROTOTYPE_H_
25 #define _I40E_PROTOTYPE_H_
26
27 #include "i40e_type.h"
28 #include "i40e_alloc.h"
29 #include "i40e_virtchnl.h"
30
31 /* Prototypes for shared code functions that are not in
32  * the standard function pointer structures.  These are
33  * mostly because they are needed even before the init
34  * has happened and will assist in the early SW and FW
35  * setup.
36  */
37
38 /* adminq functions */
39 i40e_status i40evf_init_adminq(struct i40e_hw *hw);
40 i40e_status i40evf_shutdown_adminq(struct i40e_hw *hw);
41 void i40e_adminq_init_ring_data(struct i40e_hw *hw);
42 i40e_status i40evf_clean_arq_element(struct i40e_hw *hw,
43                                              struct i40e_arq_event_info *e,
44                                              u16 *events_pending);
45 i40e_status i40evf_asq_send_command(struct i40e_hw *hw,
46                                 struct i40e_aq_desc *desc,
47                                 void *buff, /* can be NULL */
48                                 u16  buff_size,
49                                 struct i40e_asq_cmd_details *cmd_details);
50 bool i40evf_asq_done(struct i40e_hw *hw);
51
52 /* debug function for adminq */
53 void i40evf_debug_aq(struct i40e_hw *hw,
54                    enum i40e_debug_mask mask,
55                    void *desc,
56                    void *buffer);
57
58 void i40e_idle_aq(struct i40e_hw *hw);
59 void i40evf_resume_aq(struct i40e_hw *hw);
60 bool i40evf_check_asq_alive(struct i40e_hw *hw);
61 i40e_status i40evf_aq_queue_shutdown(struct i40e_hw *hw,
62                                              bool unloading);
63
64 i40e_status i40e_set_mac_type(struct i40e_hw *hw);
65
66 /* prototype for functions used for SW locks */
67
68 /* i40e_common for VF drivers*/
69 void i40e_vf_parse_hw_config(struct i40e_hw *hw,
70                              struct i40e_virtchnl_vf_resource *msg);
71 i40e_status i40e_vf_reset(struct i40e_hw *hw);
72 i40e_status i40e_aq_send_msg_to_pf(struct i40e_hw *hw,
73                                 enum i40e_virtchnl_ops v_opcode,
74                                 i40e_status v_retval,
75                                 u8 *msg, u16 msglen,
76                                 struct i40e_asq_cmd_details *cmd_details);
77 i40e_status i40e_set_filter_control(struct i40e_hw *hw,
78                                 struct i40e_filter_control_settings *settings);
79 i40e_status i40e_aq_add_rem_control_packet_filter(struct i40e_hw *hw,
80                                 u8 *mac_addr, u16 ethtype, u16 flags,
81                                 u16 vsi_seid, u16 queue, bool is_add,
82                                 struct i40e_control_filter_stats *stats,
83                                 struct i40e_asq_cmd_details *cmd_details);
84 #endif /* _I40E_PROTOTYPE_H_ */