FreeBSD kernel IXGBE device code
|
#include <sys/types.h>
#include <sys/param.h>
#include <sys/endian.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
#include <machine/resource.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#include <machine/clock.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
Go to the source code of this file.
Data Structures | |
struct | ixgbe_osdep |
Macros | |
#define | ASSERT(x) if(!(x)) panic("IXGBE: x") |
#define | EWARN(H, W) printf(W) |
#define | usec_delay(x) DELAY(x) |
#define | msec_delay(x) DELAY(1000*(x)) |
#define | DBG 0 |
#define | MSGOUT(S, A, B) printf(S "\n", A, B) |
#define | DEBUGFUNC(F) DEBUGOUT(F); |
#define | DEBUGOUT(S) |
#define | DEBUGOUT1(S, A) |
#define | DEBUGOUT2(S, A, B) |
#define | DEBUGOUT3(S, A, B, C) |
#define | DEBUGOUT4(S, A, B, C, D) |
#define | DEBUGOUT5(S, A, B, C, D, E) |
#define | DEBUGOUT6(S, A, B, C, D, E, F) |
#define | DEBUGOUT7(S, A, B, C, D, E, F, G) |
#define | ERROR_REPORT1(S, A) |
#define | ERROR_REPORT2(S, A, B) |
#define | ERROR_REPORT3(S, A, B, C) |
#define | CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */ |
#define | PCI_COMMAND_REGISTER PCIR_COMMAND |
#define | IXGBE_INTEL_VENDOR_ID 0x8086 |
#define | UNREFERENCED_PARAMETER(_p) |
#define | UNREFERENCED_1PARAMETER(_p) |
#define | UNREFERENCED_2PARAMETER(_p, _q) |
#define | UNREFERENCED_3PARAMETER(_p, _q, _r) |
#define | UNREFERENCED_4PARAMETER(_p, _q, _r, _s) |
#define | IXGBE_NTOHL(_i) ntohl(_i) |
#define | IXGBE_NTOHS(_i) ntohs(_i) |
#define | IXGBE_CPU_TO_LE16 htole16 |
#define | IXGBE_CPU_TO_LE32 htole32 |
#define | IXGBE_LE32_TO_CPU le32toh |
#define | IXGBE_LE32_TO_CPUS(x) |
#define | IXGBE_CPU_TO_BE16 htobe16 |
#define | IXGBE_CPU_TO_BE32 htobe32 |
#define | IXGBE_BE32_TO_CPU be32toh |
#define | __le16 u16 |
#define | __le32 u32 |
#define | __le64 u64 |
#define | __be16 u16 |
#define | __be32 u32 |
#define | __be64 u64 |
#define | le16_to_cpu |
#define | mb() |
#define | rmb() |
#define | wmb() |
#define | prefetch(x) |
#define | IXGBE_READ_PCIE_WORD ixgbe_read_pci_cfg |
#define | IXGBE_WRITE_PCIE_WORD ixgbe_write_pci_cfg |
#define | IXGBE_WRITE_FLUSH(a) IXGBE_READ_REG(a, IXGBE_STATUS) |
#define | IXGBE_READ_REG(a, reg) ixgbe_read_reg(a, reg) |
#define | IXGBE_WRITE_REG(a, reg, val) ixgbe_write_reg(a, reg, val) |
#define | IXGBE_READ_REG_ARRAY(a, reg, offset) ixgbe_read_reg_array(a, reg, offset) |
#define | IXGBE_WRITE_REG_ARRAY(a, reg, offset, val) ixgbe_write_reg_array(a, reg, offset, val) |
Typedefs | |
typedef uint8_t | u8 |
typedef int8_t | s8 |
typedef uint16_t | u16 |
typedef int16_t | s16 |
typedef uint32_t | u32 |
typedef int32_t | s32 |
typedef uint64_t | u64 |
typedef boolean_t | bool |
Enumerations | |
enum | { IXGBE_ERROR_SOFTWARE , IXGBE_ERROR_POLLING , IXGBE_ERROR_INVALID_STATE , IXGBE_ERROR_UNSUPPORTED , IXGBE_ERROR_ARGUMENT , IXGBE_ERROR_CAUTION } |
Functions | |
static __inline int | ixgbe_bcopy (void *restrict _src, void *restrict _dst, int l) |
u16 | ixgbe_read_pci_cfg (struct ixgbe_hw *, u32) |
void | ixgbe_write_pci_cfg (struct ixgbe_hw *, u32, u16) |
u32 | ixgbe_read_reg (struct ixgbe_hw *, u32) |
void | ixgbe_write_reg (struct ixgbe_hw *, u32, u32) |
u32 | ixgbe_read_reg_array (struct ixgbe_hw *, u32, u32) |
void | ixgbe_write_reg_array (struct ixgbe_hw *, u32, u32, u32) |
#define __be16 u16 |
Definition at line 158 of file ixgbe_osdep.h.
#define __be32 u32 |
Definition at line 159 of file ixgbe_osdep.h.
#define __be64 u64 |
Definition at line 160 of file ixgbe_osdep.h.
#define __le16 u16 |
Definition at line 155 of file ixgbe_osdep.h.
#define __le32 u32 |
Definition at line 156 of file ixgbe_osdep.h.
#define __le64 u64 |
Definition at line 157 of file ixgbe_osdep.h.
#define ASSERT | ( | x | ) | if(!(x)) panic("IXGBE: x") |
Definition at line 58 of file ixgbe_osdep.h.
#define CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */ |
Definition at line 118 of file ixgbe_osdep.h.
#define DBG 0 |
Definition at line 74 of file ixgbe_osdep.h.
#define DEBUGFUNC | ( | F | ) | DEBUGOUT(F); |
Definition at line 76 of file ixgbe_osdep.h.
#define DEBUGOUT | ( | S | ) |
Definition at line 104 of file ixgbe_osdep.h.
#define DEBUGOUT1 | ( | S, | |
A | |||
) |
Definition at line 105 of file ixgbe_osdep.h.
#define DEBUGOUT2 | ( | S, | |
A, | |||
B | |||
) |
Definition at line 106 of file ixgbe_osdep.h.
#define DEBUGOUT3 | ( | S, | |
A, | |||
B, | |||
C | |||
) |
Definition at line 107 of file ixgbe_osdep.h.
#define DEBUGOUT4 | ( | S, | |
A, | |||
B, | |||
C, | |||
D | |||
) |
Definition at line 108 of file ixgbe_osdep.h.
#define DEBUGOUT5 | ( | S, | |
A, | |||
B, | |||
C, | |||
D, | |||
E | |||
) |
Definition at line 109 of file ixgbe_osdep.h.
#define DEBUGOUT6 | ( | S, | |
A, | |||
B, | |||
C, | |||
D, | |||
E, | |||
F | |||
) |
Definition at line 110 of file ixgbe_osdep.h.
#define DEBUGOUT7 | ( | S, | |
A, | |||
B, | |||
C, | |||
D, | |||
E, | |||
F, | |||
G | |||
) |
Definition at line 111 of file ixgbe_osdep.h.
#define ERROR_REPORT1 | ( | S, | |
A | |||
) |
Definition at line 113 of file ixgbe_osdep.h.
#define ERROR_REPORT2 | ( | S, | |
A, | |||
B | |||
) |
Definition at line 114 of file ixgbe_osdep.h.
#define ERROR_REPORT3 | ( | S, | |
A, | |||
B, | |||
C | |||
) |
Definition at line 115 of file ixgbe_osdep.h.
#define EWARN | ( | H, | |
W | |||
) | printf(W) |
Definition at line 59 of file ixgbe_osdep.h.
#define IXGBE_BE32_TO_CPU be32toh |
Definition at line 141 of file ixgbe_osdep.h.
#define IXGBE_CPU_TO_BE16 htobe16 |
Definition at line 139 of file ixgbe_osdep.h.
#define IXGBE_CPU_TO_BE32 htobe32 |
Definition at line 140 of file ixgbe_osdep.h.
#define IXGBE_CPU_TO_LE16 htole16 |
Definition at line 135 of file ixgbe_osdep.h.
#define IXGBE_CPU_TO_LE32 htole32 |
Definition at line 136 of file ixgbe_osdep.h.
#define IXGBE_INTEL_VENDOR_ID 0x8086 |
Definition at line 122 of file ixgbe_osdep.h.
#define IXGBE_LE32_TO_CPU le32toh |
Definition at line 137 of file ixgbe_osdep.h.
#define IXGBE_LE32_TO_CPUS | ( | x | ) |
Definition at line 138 of file ixgbe_osdep.h.
#define IXGBE_NTOHL | ( | _i | ) | ntohl(_i) |
Definition at line 131 of file ixgbe_osdep.h.
#define IXGBE_NTOHS | ( | _i | ) | ntohs(_i) |
Definition at line 132 of file ixgbe_osdep.h.
#define IXGBE_READ_PCIE_WORD ixgbe_read_pci_cfg |
Definition at line 216 of file ixgbe_osdep.h.
#define IXGBE_READ_REG | ( | a, | |
reg | |||
) | ixgbe_read_reg(a, reg) |
Definition at line 224 of file ixgbe_osdep.h.
#define IXGBE_READ_REG_ARRAY | ( | a, | |
reg, | |||
offset | |||
) | ixgbe_read_reg_array(a, reg, offset) |
Definition at line 230 of file ixgbe_osdep.h.
#define IXGBE_WRITE_FLUSH | ( | a | ) | IXGBE_READ_REG(a, IXGBE_STATUS) |
Definition at line 221 of file ixgbe_osdep.h.
#define IXGBE_WRITE_PCIE_WORD ixgbe_write_pci_cfg |
Definition at line 219 of file ixgbe_osdep.h.
#define IXGBE_WRITE_REG | ( | a, | |
reg, | |||
val | |||
) | ixgbe_write_reg(a, reg, val) |
Definition at line 227 of file ixgbe_osdep.h.
#define IXGBE_WRITE_REG_ARRAY | ( | a, | |
reg, | |||
offset, | |||
val | |||
) | ixgbe_write_reg_array(a, reg, offset, val) |
Definition at line 234 of file ixgbe_osdep.h.
#define le16_to_cpu |
Definition at line 162 of file ixgbe_osdep.h.
#define mb | ( | ) |
Definition at line 170 of file ixgbe_osdep.h.
#define msec_delay | ( | x | ) | DELAY(1000*(x)) |
Definition at line 72 of file ixgbe_osdep.h.
#define MSGOUT | ( | S, | |
A, | |||
B | |||
) | printf(S "\n", A, B) |
Definition at line 75 of file ixgbe_osdep.h.
#define PCI_COMMAND_REGISTER PCIR_COMMAND |
Definition at line 119 of file ixgbe_osdep.h.
#define prefetch | ( | x | ) |
Definition at line 183 of file ixgbe_osdep.h.
#define rmb | ( | ) |
Definition at line 171 of file ixgbe_osdep.h.
#define UNREFERENCED_1PARAMETER | ( | _p | ) |
Definition at line 126 of file ixgbe_osdep.h.
#define UNREFERENCED_2PARAMETER | ( | _p, | |
_q | |||
) |
Definition at line 127 of file ixgbe_osdep.h.
#define UNREFERENCED_3PARAMETER | ( | _p, | |
_q, | |||
_r | |||
) |
Definition at line 128 of file ixgbe_osdep.h.
#define UNREFERENCED_4PARAMETER | ( | _p, | |
_q, | |||
_r, | |||
_s | |||
) |
Definition at line 129 of file ixgbe_osdep.h.
#define UNREFERENCED_PARAMETER | ( | _p | ) |
Definition at line 125 of file ixgbe_osdep.h.
#define usec_delay | ( | x | ) | DELAY(x) |
Definition at line 71 of file ixgbe_osdep.h.
#define wmb | ( | ) |
Definition at line 172 of file ixgbe_osdep.h.
typedef boolean_t bool |
Definition at line 151 of file ixgbe_osdep.h.
typedef int16_t s16 |
Definition at line 146 of file ixgbe_osdep.h.
typedef int32_t s32 |
Definition at line 148 of file ixgbe_osdep.h.
typedef int8_t s8 |
Definition at line 144 of file ixgbe_osdep.h.
typedef uint16_t u16 |
Definition at line 145 of file ixgbe_osdep.h.
typedef uint32_t u32 |
Definition at line 147 of file ixgbe_osdep.h.
typedef uint64_t u64 |
Definition at line 149 of file ixgbe_osdep.h.
typedef uint8_t u8 |
Definition at line 143 of file ixgbe_osdep.h.
anonymous enum |
Enumerator | |
---|---|
IXGBE_ERROR_SOFTWARE | |
IXGBE_ERROR_POLLING | |
IXGBE_ERROR_INVALID_STATE | |
IXGBE_ERROR_UNSUPPORTED | |
IXGBE_ERROR_ARGUMENT | |
IXGBE_ERROR_CAUTION |
Definition at line 61 of file ixgbe_osdep.h.
|
static |
Definition at line 191 of file ixgbe_osdep.h.
Definition at line 38 of file ixgbe_osdep.c.
References ixgbe_hw::back.
Definition at line 50 of file ixgbe_osdep.c.
References ixgbe_hw::back.
Definition at line 65 of file ixgbe_osdep.c.
References ixgbe_hw::back.
Definition at line 44 of file ixgbe_osdep.c.
References ixgbe_hw::back.
Definition at line 57 of file ixgbe_osdep.c.
References ixgbe_hw::back.
Definition at line 73 of file ixgbe_osdep.c.
References ixgbe_hw::back.