Imported Upstream version 16.04
[deb_dpdk.git] / drivers / net / fm10k / base / fm10k_api.h
1 /*******************************************************************************
2
3 Copyright (c) 2013 - 2015, Intel Corporation
4 All rights reserved.
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
8
9  1. Redistributions of source code must retain the above copyright notice,
10     this list of conditions and the following disclaimer.
11
12  2. Redistributions in binary form must reproduce the above copyright
13     notice, this list of conditions and the following disclaimer in the
14     documentation and/or other materials provided with the distribution.
15
16  3. Neither the name of the Intel Corporation nor the names of its
17     contributors may be used to endorse or promote products derived from
18     this software without specific prior written permission.
19
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 POSSIBILITY OF SUCH DAMAGE.
31
32 ***************************************************************************/
33
34 #ifndef _FM10K_API_H_
35 #define _FM10K_API_H_
36
37 #include "fm10k_pf.h"
38 #include "fm10k_vf.h"
39
40 s32 fm10k_set_mac_type(struct fm10k_hw *hw);
41 s32 fm10k_reset_hw(struct fm10k_hw *hw);
42 s32 fm10k_init_hw(struct fm10k_hw *hw);
43 s32 fm10k_stop_hw(struct fm10k_hw *hw);
44 s32 fm10k_start_hw(struct fm10k_hw *hw);
45 s32 fm10k_init_shared_code(struct fm10k_hw *hw);
46 s32 fm10k_get_bus_info(struct fm10k_hw *hw);
47 #ifndef NO_IS_SLOT_APPROPRIATE_CHECK
48 bool fm10k_is_slot_appropriate(struct fm10k_hw *hw);
49 #endif
50 s32 fm10k_update_vlan(struct fm10k_hw *hw, u32 vid, u8 idx, bool set);
51 s32 fm10k_read_mac_addr(struct fm10k_hw *hw);
52 void fm10k_update_hw_stats(struct fm10k_hw *hw, struct fm10k_hw_stats *stats);
53 void fm10k_rebind_hw_stats(struct fm10k_hw *hw, struct fm10k_hw_stats *stats);
54 s32 fm10k_configure_dglort_map(struct fm10k_hw *hw,
55                                struct fm10k_dglort_cfg *dglort);
56 void fm10k_set_dma_mask(struct fm10k_hw *hw, u64 dma_mask);
57 s32 fm10k_get_fault(struct fm10k_hw *hw, int type, struct fm10k_fault *fault);
58 s32 fm10k_update_uc_addr(struct fm10k_hw *hw, u16 lport,
59                           const u8 *mac, u16 vid, bool add, u8 flags);
60 s32 fm10k_update_mc_addr(struct fm10k_hw *hw, u16 lport,
61                          const u8 *mac, u16 vid, bool add);
62 s32 fm10k_adjust_systime(struct fm10k_hw *hw, s32 ppb);
63 s32 fm10k_notify_offset(struct fm10k_hw *hw, u64 offset);
64 #endif /* _FM10K_API_H_ */