1
2
3
4#ifndef _I40E_OSDEP_H_
5#define _I40E_OSDEP_H_
6
7#include <linux/types.h>
8#include <linux/if_ether.h>
9#include <linux/if_vlan.h>
10#include <linux/tcp.h>
11#include <linux/pci.h>
12
13
14#include <asm-generic/io-64-nonatomic-lo-hi.h>
15
16
17
18
19
20#define hw_dbg(hw, S, A...) do {} while (0)
21
22#define wr32(a, reg, value) writel((value), ((a)->hw_addr + (reg)))
23#define rd32(a, reg) readl((a)->hw_addr + (reg))
24
25#define wr64(a, reg, value) writeq((value), ((a)->hw_addr + (reg)))
26#define rd64(a, reg) readq((a)->hw_addr + (reg))
27#define i40e_flush(a) readl((a)->hw_addr + I40E_VFGEN_RSTAT)
28
29
30struct i40e_dma_mem {
31 void *va;
32 dma_addr_t pa;
33 u32 size;
34};
35
36#define i40e_allocate_dma_mem(h, m, unused, s, a) \
37 i40evf_allocate_dma_mem_d(h, m, s, a)
38#define i40e_free_dma_mem(h, m) i40evf_free_dma_mem_d(h, m)
39
40struct i40e_virt_mem {
41 void *va;
42 u32 size;
43};
44#define i40e_allocate_virt_mem(h, m, s) i40evf_allocate_virt_mem_d(h, m, s)
45#define i40e_free_virt_mem(h, m) i40evf_free_virt_mem_d(h, m)
46
47#define i40e_debug(h, m, s, ...) i40evf_debug_d(h, m, s, ##__VA_ARGS__)
48extern void i40evf_debug_d(void *hw, u32 mask, char *fmt_str, ...)
49 __attribute__ ((format(gnu_printf, 3, 4)));
50
51typedef enum i40e_status_code i40e_status;
52#endif
53