1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 #ifndef MPI_LAN_H
38 #define MPI_LAN_H
39
40
41
42
43
44
45
46
47
48
49 typedef struct _MSG_LAN_SEND_REQUEST
50 {
51 U16 Reserved;
52 U8 ChainOffset;
53 U8 Function;
54 U16 Reserved2;
55 U8 PortNumber;
56 U8 MsgFlags;
57 U32 MsgContext;
58 SGE_MPI_UNION SG_List[1];
59 } MSG_LAN_SEND_REQUEST, MPI_POINTER PTR_MSG_LAN_SEND_REQUEST,
60 LANSendRequest_t, MPI_POINTER pLANSendRequest_t;
61
62
63 typedef struct _MSG_LAN_SEND_REPLY
64 {
65 U16 Reserved;
66 U8 MsgLength;
67 U8 Function;
68 U8 Reserved2;
69 U8 NumberOfContexts;
70 U8 PortNumber;
71 U8 MsgFlags;
72 U32 MsgContext;
73 U16 Reserved3;
74 U16 IOCStatus;
75 U32 IOCLogInfo;
76 U32 BufferContext;
77 } MSG_LAN_SEND_REPLY, MPI_POINTER PTR_MSG_LAN_SEND_REPLY,
78 LANSendReply_t, MPI_POINTER pLANSendReply_t;
79
80
81
82
83 typedef struct _MSG_LAN_RECEIVE_POST_REQUEST
84 {
85 U16 Reserved;
86 U8 ChainOffset;
87 U8 Function;
88 U16 Reserved2;
89 U8 PortNumber;
90 U8 MsgFlags;
91 U32 MsgContext;
92 U32 BucketCount;
93 SGE_MPI_UNION SG_List[1];
94 } MSG_LAN_RECEIVE_POST_REQUEST, MPI_POINTER PTR_MSG_LAN_RECEIVE_POST_REQUEST,
95 LANReceivePostRequest_t, MPI_POINTER pLANReceivePostRequest_t;
96
97
98 typedef struct _MSG_LAN_RECEIVE_POST_REPLY
99 {
100 U16 Reserved;
101 U8 MsgLength;
102 U8 Function;
103 U8 Reserved2;
104 U8 NumberOfContexts;
105 U8 PortNumber;
106 U8 MsgFlags;
107 U32 MsgContext;
108 U16 Reserved3;
109 U16 IOCStatus;
110 U32 IOCLogInfo;
111 U32 BucketsRemaining;
112 U32 PacketOffset;
113 U32 PacketLength;
114 U32 BucketContext[1];
115 } MSG_LAN_RECEIVE_POST_REPLY, MPI_POINTER PTR_MSG_LAN_RECEIVE_POST_REPLY,
116 LANReceivePostReply_t, MPI_POINTER pLANReceivePostReply_t;
117
118
119
120
121 typedef struct _MSG_LAN_RESET_REQUEST
122 {
123 U16 Reserved;
124 U8 ChainOffset;
125 U8 Function;
126 U16 Reserved2;
127 U8 PortNumber;
128 U8 MsgFlags;
129 U32 MsgContext;
130 } MSG_LAN_RESET_REQUEST, MPI_POINTER PTR_MSG_LAN_RESET_REQUEST,
131 LANResetRequest_t, MPI_POINTER pLANResetRequest_t;
132
133
134 typedef struct _MSG_LAN_RESET_REPLY
135 {
136 U16 Reserved;
137 U8 MsgLength;
138 U8 Function;
139 U16 Reserved2;
140 U8 PortNumber;
141 U8 MsgFlags;
142 U32 MsgContext;
143 U16 Reserved3;
144 U16 IOCStatus;
145 U32 IOCLogInfo;
146 } MSG_LAN_RESET_REPLY, MPI_POINTER PTR_MSG_LAN_RESET_REPLY,
147 LANResetReply_t, MPI_POINTER pLANResetReply_t;
148
149
150
151
152
153
154 #define LAN_REPLY_PACKET_LENGTH_MASK (0x0000FFFF)
155 #define LAN_REPLY_PACKET_LENGTH_SHIFT (0)
156 #define LAN_REPLY_BUCKET_CONTEXT_MASK (0x07FF0000)
157 #define LAN_REPLY_BUCKET_CONTEXT_SHIFT (16)
158 #define LAN_REPLY_BUFFER_CONTEXT_MASK (0x07FFFFFF)
159 #define LAN_REPLY_BUFFER_CONTEXT_SHIFT (0)
160 #define LAN_REPLY_FORM_MASK (0x18000000)
161 #define LAN_REPLY_FORM_RECEIVE_SINGLE (0x00)
162 #define LAN_REPLY_FORM_RECEIVE_MULTIPLE (0x01)
163 #define LAN_REPLY_FORM_SEND_SINGLE (0x02)
164 #define LAN_REPLY_FORM_MESSAGE_CONTEXT (0x03)
165 #define LAN_REPLY_FORM_SHIFT (27)
166
167 #define GET_LAN_PACKET_LENGTH(x) (((x) & LAN_REPLY_PACKET_LENGTH_MASK) \
168 >> LAN_REPLY_PACKET_LENGTH_SHIFT)
169
170 #define SET_LAN_PACKET_LENGTH(x, lth) \
171 ((x) = ((x) & ~LAN_REPLY_PACKET_LENGTH_MASK) | \
172 (((lth) << LAN_REPLY_PACKET_LENGTH_SHIFT) & \
173 LAN_REPLY_PACKET_LENGTH_MASK))
174
175 #define GET_LAN_BUCKET_CONTEXT(x) (((x) & LAN_REPLY_BUCKET_CONTEXT_MASK) \
176 >> LAN_REPLY_BUCKET_CONTEXT_SHIFT)
177
178 #define SET_LAN_BUCKET_CONTEXT(x, ctx) \
179 ((x) = ((x) & ~LAN_REPLY_BUCKET_CONTEXT_MASK) | \
180 (((ctx) << LAN_REPLY_BUCKET_CONTEXT_SHIFT) & \
181 LAN_REPLY_BUCKET_CONTEXT_MASK))
182
183 #define GET_LAN_BUFFER_CONTEXT(x) (((x) & LAN_REPLY_BUFFER_CONTEXT_MASK) \
184 >> LAN_REPLY_BUFFER_CONTEXT_SHIFT)
185
186 #define SET_LAN_BUFFER_CONTEXT(x, ctx) \
187 ((x) = ((x) & ~LAN_REPLY_BUFFER_CONTEXT_MASK) | \
188 (((ctx) << LAN_REPLY_BUFFER_CONTEXT_SHIFT) & \
189 LAN_REPLY_BUFFER_CONTEXT_MASK))
190
191 #define GET_LAN_FORM(x) (((x) & LAN_REPLY_FORM_MASK) \
192 >> LAN_REPLY_FORM_SHIFT)
193
194 #define SET_LAN_FORM(x, frm) \
195 ((x) = ((x) & ~LAN_REPLY_FORM_MASK) | \
196 (((frm) << LAN_REPLY_FORM_SHIFT) & \
197 LAN_REPLY_FORM_MASK))
198
199
200
201
202
203
204 #define MPI_LAN_DEVICE_STATE_RESET (0x00)
205 #define MPI_LAN_DEVICE_STATE_OPERATIONAL (0x01)
206
207
208
209
210
211
212 #define MPI_LAN_TX_MODES_ENABLE_LOOPBACK_SUPPRESSION (0x01)
213
214 #endif
215