1
2
3
4 #ifndef _E1000_DEFINES_H_
5 #define _E1000_DEFINES_H_
6
7
8 #define REQ_TX_DESCRIPTOR_MULTIPLE 8
9 #define REQ_RX_DESCRIPTOR_MULTIPLE 8
10
11
12 #define E1000_IVAR_VALID 0x80
13
14
15 #define E1000_RXD_STAT_DD 0x01
16 #define E1000_RXD_STAT_EOP 0x02
17 #define E1000_RXD_STAT_IXSM 0x04
18 #define E1000_RXD_STAT_VP 0x08
19 #define E1000_RXD_STAT_UDPCS 0x10
20 #define E1000_RXD_STAT_TCPCS 0x20
21 #define E1000_RXD_STAT_IPCS 0x40
22 #define E1000_RXD_ERR_SE 0x02
23 #define E1000_RXD_SPC_VLAN_MASK 0x0FFF
24
25 #define E1000_RXDEXT_STATERR_LB 0x00040000
26 #define E1000_RXDEXT_STATERR_CE 0x01000000
27 #define E1000_RXDEXT_STATERR_SE 0x02000000
28 #define E1000_RXDEXT_STATERR_SEQ 0x04000000
29 #define E1000_RXDEXT_STATERR_CXE 0x10000000
30 #define E1000_RXDEXT_STATERR_TCPE 0x20000000
31 #define E1000_RXDEXT_STATERR_IPE 0x40000000
32 #define E1000_RXDEXT_STATERR_RXE 0x80000000
33
34
35 #define E1000_RXDEXT_ERR_FRAME_ERR_MASK ( \
36 E1000_RXDEXT_STATERR_CE | \
37 E1000_RXDEXT_STATERR_SE | \
38 E1000_RXDEXT_STATERR_SEQ | \
39 E1000_RXDEXT_STATERR_CXE | \
40 E1000_RXDEXT_STATERR_RXE)
41
42
43 #define E1000_CTRL_RST 0x04000000
44
45
46 #define E1000_STATUS_FD 0x00000001
47 #define E1000_STATUS_LU 0x00000002
48 #define E1000_STATUS_TXOFF 0x00000010
49 #define E1000_STATUS_SPEED_10 0x00000000
50 #define E1000_STATUS_SPEED_100 0x00000040
51 #define E1000_STATUS_SPEED_1000 0x00000080
52
53 #define SPEED_10 10
54 #define SPEED_100 100
55 #define SPEED_1000 1000
56 #define HALF_DUPLEX 1
57 #define FULL_DUPLEX 2
58
59
60 #define E1000_TXD_POPTS_IXSM 0x01
61 #define E1000_TXD_POPTS_TXSM 0x02
62 #define E1000_TXD_CMD_DEXT 0x20000000
63 #define E1000_TXD_STAT_DD 0x00000001
64
65 #define MAX_JUMBO_FRAME_SIZE 0x3F00
66 #define MAX_STD_JUMBO_FRAME_SIZE 9216
67
68
69 #define VLAN_TAG_SIZE 4
70
71
72 #define E1000_SUCCESS 0
73 #define E1000_ERR_CONFIG 3
74 #define E1000_ERR_MAC_INIT 5
75 #define E1000_ERR_MBX 15
76
77
78 #define E1000_SRRCTL_BSIZEPKT_SHIFT 10
79 #define E1000_SRRCTL_BSIZEHDRSIZE_MASK 0x00000F00
80 #define E1000_SRRCTL_BSIZEHDRSIZE_SHIFT 2
81 #define E1000_SRRCTL_DESCTYPE_ADV_ONEBUF 0x02000000
82 #define E1000_SRRCTL_DESCTYPE_HDR_SPLIT_ALWAYS 0x0A000000
83 #define E1000_SRRCTL_DESCTYPE_MASK 0x0E000000
84 #define E1000_SRRCTL_DROP_EN 0x80000000
85
86 #define E1000_SRRCTL_BSIZEPKT_MASK 0x0000007F
87 #define E1000_SRRCTL_BSIZEHDR_MASK 0x00003F00
88
89
90 #define E1000_TXDCTL_QUEUE_ENABLE 0x02000000
91 #define E1000_RXDCTL_QUEUE_ENABLE 0x02000000
92
93
94 #define E1000_DCA_TXCTRL_TX_WB_RO_EN BIT(11)
95
96 #define E1000_VF_INIT_TIMEOUT 200
97
98 #endif