[HW, TOOLS] fixed a bug, causing incorrect value of max_addr_handles in query_ca...
[mirror/winof/.git] / core / al / al_dev.h
1 /*\r
2  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
3  * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
4  * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
5  *\r
6  * This software is available to you under the OpenIB.org BSD license\r
7  * below:\r
8  *\r
9  *     Redistribution and use in source and binary forms, with or\r
10  *     without modification, are permitted provided that the following\r
11  *     conditions are met:\r
12  *\r
13  *      - Redistributions of source code must retain the above\r
14  *        copyright notice, this list of conditions and the following\r
15  *        disclaimer.\r
16  *\r
17  *      - Redistributions in binary form must reproduce the above\r
18  *        copyright notice, this list of conditions and the following\r
19  *        disclaimer in the documentation and/or other materials\r
20  *        provided with the distribution.\r
21  *\r
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
23  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
24  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
25  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
26  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
27  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
28  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
29  * SOFTWARE.\r
30  *\r
31  * $Id$\r
32  */\r
33 \r
34 \r
35 \r
36 /*\r
37  * Abstract:\r
38  *      This header file defines data structures for the user-mode proxy\r
39  *      and UAL support\r
40  *\r
41  * Environment:\r
42  *      Kernel and User Mode.\r
43  */\r
44 \r
45 \r
46 #ifndef _ALDEV_H_\r
47 #define _ALDEV_H_\r
48 \r
49 #include <complib/comp_lib.h>\r
50 #include <complib/cl_waitobj.h>\r
51 #include <complib/cl_ioctl.h>\r
52 #include <iba/ib_al.h>\r
53 #include <iba/ib_al_ioctl.h>\r
54 \r
55 #define AL_DEVICE_NAME  L"\\Device\\ibal"\r
56 #define ALDEV_KEY               (0x3B)  /* Matches FILE_DEVICE_INFINIBAND from wdm.h */\r
57 \r
58 #define AL_IOCTL_VERSION                        (10)\r
59 \r
60 /* max number of devices with non-default pkey */\r
61 #define MAX_NUM_PKEY    16\r
62 \r
63 typedef struct _pkey_array\r
64 {\r
65         ib_net16_t         pkey_num;\r
66         ib_net16_t     pkey_array[MAX_NUM_PKEY];\r
67 }pkey_array_t;\r
68 #ifdef  CL_KERNEL\r
69 \r
70 /* Function prototypes for al device framework */\r
71 \r
72 AL_EXPORT cl_status_t AL_API\r
73 al_dev_open(\r
74         IN                              cl_ioctl_handle_t                       h_ioctl );\r
75 \r
76 AL_EXPORT cl_status_t AL_API\r
77 al_dev_close(\r
78         IN                              cl_ioctl_handle_t                       h_ioctl );\r
79 \r
80 AL_EXPORT cl_status_t AL_API\r
81 al_dev_ioctl(\r
82         IN                              cl_ioctl_handle_t                       h_ioctl );\r
83 \r
84 void\r
85 al_dev_cancel_ioctl(\r
86         IN                              cl_ioctl_handle_t                       h_ioctl );\r
87 \r
88 void\r
89 al_dev_cancel_io(\r
90         IN                              DEVICE_OBJECT                           *p_dev_obj,\r
91         IN                              IRP                                                     *p_irp );\r
92 \r
93 cl_status_t\r
94 bus_add_pkey(\r
95         IN                              cl_ioctl_handle_t                       h_ioctl );\r
96 \r
97 /* Define data structures for user-mode proxy */\r
98 #else           /* CL_KERNEL */\r
99 \r
100 \r
101 /* Prototype for the ioctl support function */\r
102 cl_status_t\r
103 do_al_dev_ioctl(\r
104         IN                              uint32_t                                        command,\r
105         IN                              void                                            *p_buf,\r
106         IN                              uintn_t                                         buf_size,\r
107         IN                              void                                            *p_out_buf,\r
108         IN                              uintn_t                                         out_buf_size,\r
109                 OUT                     uintn_t                                         *p_bytes_ret );\r
110 \r
111 \r
112 #endif          /* CL_KERNEL */\r
113 \r
114 /*\r
115  * Shared between user and kernel mode.\r
116  */\r
117 \r
118 \r
119 /****d* AL device Helper/al_proxy_ops_t\r
120 * NAME\r
121 *       al_proxy_ops_t\r
122 *\r
123 * DESCRIPTION\r
124 *\r
125 *       Define the enumeration for UAL/proxy excluding AL specific\r
126 *       These are intended to be the support ioctls such as the\r
127 *       notification from the proxy to the UAL in user-mode\r
128 *\r
129 * SYNOPSIS\r
130 */\r
131 typedef enum al_proxy_ops\r
132 {\r
133         al_proxy_ops_start = 0,\r
134 \r
135         ual_get_comp_cb_info = al_proxy_ops_start+1,\r
136         ual_get_misc_cb_info,\r
137         ual_bind,\r
138         ual_bind_sa,\r
139         ual_bind_pnp,\r
140         ual_bind_misc,\r
141         ual_bind_cm,\r
142         ual_bind_cq,\r
143         ual_bind_destroy,\r
144         ual_bind_nd,\r
145         ual_req_create_pdo,\r
146         al_proxy_maxops\r
147 \r
148 }       al_proxy_ops_t;\r
149 /**********/\r
150 /*\r
151  * Various Opration Allowable on the System Helper\r
152  */\r
153 \r
154 /* IOCTL to specify what notification wait objects are used by UAL\r
155  * for asynchronous event notifications from proxy\r
156  */\r
157 \r
158 #define UAL_GET_COMP_CB_INFO    IOCTL_CODE(ALDEV_KEY, ual_get_comp_cb_info)\r
159 #define UAL_GET_MISC_CB_INFO    IOCTL_CODE(ALDEV_KEY, ual_get_misc_cb_info)\r
160 #define UAL_BIND                        IOCTL_CODE(ALDEV_KEY, ual_bind)\r
161 #define UAL_BIND_SA                     IOCTL_CODE(ALDEV_KEY, ual_bind_sa)\r
162 #define UAL_BIND_PNP            IOCTL_CODE(ALDEV_KEY, ual_bind_pnp)\r
163 #define UAL_BIND_MISC           IOCTL_CODE(ALDEV_KEY, ual_bind_misc)\r
164 #define UAL_BIND_CM                     IOCTL_CODE(ALDEV_KEY, ual_bind_cm)\r
165 #define UAL_BIND_CQ                     IOCTL_CODE(ALDEV_KEY, ual_bind_cq)\r
166 #define UAL_BIND_DESTROY        IOCTL_CODE(ALDEV_KEY, ual_bind_destroy)\r
167 #define UAL_BIND_ND                     IOCTL_CODE(ALDEV_KEY, ual_bind_nd)\r
168 #define UAL_REQ_CREATE_PDO  IOCTL_CODE(ALDEV_KEY, ual_req_create_pdo)\r
169 \r
170 #define AL_PROXY_OPS_START      IOCTL_CODE(ALDEV_KEY, al_proxy_ops_start)\r
171 #define AL_PROXY_MAXOPS         IOCTL_CODE(ALDEV_KEY, al_proxy_maxops)\r
172 \r
173 #define IS_AL_PROXY_IOCTL(cmd)  \\r
174                         ((cmd) > AL_PROXY_OPS_START && (cmd) < AL_PROXY_MAXOPS)\r
175 \r
176 \r
177 \r
178 /****d* AL device Helper/al_dev_ops_t\r
179 * NAME\r
180 *       al_dev_ops_t\r
181 *\r
182 * DESCRIPTION\r
183 *       AL device supports the following ioctls\r
184 *               1. those meant strictly for the consumption of the proxy\r
185 *               2. those meant to denote an AL api and hence the call\r
186 *               is further dispatched AL api and/or KAL internal interface\r
187 *\r
188 * SYNOPSIS\r
189 */\r
190 /* All verbs related ioctls */\r
191 typedef enum _al_verbs_ops\r
192 {\r
193         al_verbs_ops_start = al_proxy_maxops,\r
194 \r
195         ual_get_uvp_name_cmd = al_verbs_ops_start + 1,\r
196         ual_open_ca_ioctl_cmd,\r
197         ual_query_ca_ioctl_cmd,\r
198         ual_modify_ca_ioctl_cmd,\r
199         ual_close_ca_ioctl_cmd,\r
200         ual_ci_call_ioctl_cmd,\r
201         ual_alloc_pd_ioctl_cmd,\r
202         ual_dealloc_pd_ioctl_cmd,\r
203         ual_create_av_ioctl_cmd,\r
204         ual_query_av_ioctl_cmd,\r
205         ual_modify_av_ioctl_cmd,\r
206         ual_destroy_av_ioctl_cmd,\r
207         ual_create_srq_ioctl_cmd,\r
208         ual_query_srq_ioctl_cmd,\r
209         ual_modify_srq_ioctl_cmd,\r
210         ual_destroy_srq_ioctl_cmd,\r
211         ual_create_qp_ioctl_cmd,\r
212         ual_query_qp_ioctl_cmd,\r
213         ual_modify_qp_ioctl_cmd,\r
214         ual_destroy_qp_ioctl_cmd,\r
215         ual_create_cq_ioctl_cmd,\r
216         ual_query_cq_ioctl_cmd,\r
217         ual_modify_cq_ioctl_cmd,\r
218         ual_destroy_cq_ioctl_cmd,\r
219         ual_reg_mr_ioctl_cmd,\r
220         ual_query_mr_ioctl_cmd,\r
221         ual_rereg_mem_ioctl_cmd,\r
222         ual_reg_shared_ioctl_cmd,\r
223         ual_dereg_mr_ioctl_cmd,\r
224         ual_create_mw_ioctl_cmd,\r
225         ual_query_mw_ioctl_cmd,\r
226         ual_bind_mw_ioctl_cmd,\r
227         ual_destroy_mw_ioctl_cmd,\r
228         ual_post_send_ioctl_cmd,\r
229         ual_post_recv_ioctl_cmd,\r
230         ual_post_srq_recv_ioctl_cmd,\r
231         ual_peek_cq_ioctl_cmd,\r
232         ual_poll_cq_ioctl_cmd,\r
233         ual_rearm_cq_ioctl_cmd,\r
234         ual_rearm_n_cq_ioctl_cmd,\r
235         ual_attach_mcast_ioctl_cmd,\r
236         ual_detach_mcast_ioctl_cmd,\r
237         ual_get_spl_qp_cmd,\r
238 \r
239         al_verbs_maxops\r
240 \r
241 }       al_verbs_ops_t;\r
242 \r
243 #define AL_VERBS_OPS_START      IOCTL_CODE(ALDEV_KEY, al_verbs_ops_start)\r
244 #define AL_VERBS_MAXOPS         IOCTL_CODE(ALDEV_KEY, al_verbs_maxops)\r
245 #define IS_VERBS_IOCTL(cmd)             \\r
246         ((cmd) > AL_VERBS_OPS_START && (cmd) < AL_VERBS_MAXOPS)\r
247 \r
248 /* All subnet management related ioctls */\r
249 \r
250 typedef enum _al_subnet_ops\r
251 {\r
252         al_subnet_ops_start = al_verbs_maxops,\r
253 \r
254         ual_reg_svc_cmd = al_subnet_ops_start + 1,\r
255         ual_dereg_svc_cmd,\r
256         ual_send_sa_req_cmd,\r
257         ual_cancel_sa_req_cmd,\r
258         ual_mad_send_cmd,\r
259         ual_mad_recv_cmd,\r
260         ual_init_dgram_svc_cmd,\r
261         ual_reg_mad_svc_cmd,\r
262         ual_dereg_mad_svc_cmd,\r
263         ual_reg_mad_pool_cmd,\r
264         ual_dereg_mad_pool_cmd,\r
265         ual_cancel_mad_cmd,\r
266         ual_mad_recv_comp_cmd,\r
267         ual_local_mad_cmd,\r
268         \r
269         al_subnet_maxops\r
270 \r
271 }       al_subnet_ops_t;\r
272 \r
273 #define AL_SUBNET_OPS_START     IOCTL_CODE(ALDEV_KEY, al_subnet_ops_start)\r
274 #define AL_SUBNET_MAXOPS        IOCTL_CODE(ALDEV_KEY, al_subnet_maxops)\r
275 #define IS_SUBNET_IOCTL(cmd)    \\r
276         ((cmd) > AL_SUBNET_OPS_START && (cmd) < AL_SUBNET_MAXOPS)\r
277 \r
278 /* All ioc related ioctls */\r
279 \r
280 typedef enum _al_ioc_ops\r
281 {\r
282         al_ioc_ops_start = al_subnet_maxops,\r
283 \r
284         ual_create_ioc_cmd = al_ioc_ops_start + 1,\r
285         ual_destroy_ioc_cmd,\r
286         ual_reg_ioc_cmd,\r
287         ual_reject_ioc_cmd,\r
288         ual_add_svc_entry_cmd,\r
289         ual_remove_svc_entry_cmd,\r
290 \r
291         al_ioc_maxops\r
292 \r
293 }       al_ioc_ops_t;\r
294 \r
295 #define AL_IOC_OPS_START        IOCTL_CODE(ALDEV_KEY, al_ioc_ops_start)\r
296 #define AL_IOC_MAXOPS           IOCTL_CODE(ALDEV_KEY, al_ioc_maxops)\r
297 #define IS_IOC_IOCTL(cmd)               \\r
298         ((cmd) > AL_IOC_OPS_START && (cmd) < AL_IOC_MAXOPS)\r
299 \r
300 typedef enum _al_cm_sidr_ops\r
301 {\r
302         al_cm_ops_start = al_ioc_maxops,\r
303         ual_cm_req_cmd = al_cm_ops_start + 1,\r
304         ual_cm_rep_cmd,\r
305         ual_cm_dreq_cmd,\r
306         ual_cm_drep_cmd,\r
307         ual_cm_listen_cmd,\r
308         ual_cm_cancel_cmd,\r
309         ual_cm_rtu_cmd,\r
310         ual_cm_rej_cmd,\r
311         ual_cm_handoff_cmd,\r
312         ual_cm_mra_cmd,\r
313         ual_cm_lap_cmd,\r
314         ual_cm_apr_cmd,\r
315         ual_force_apm_cmd,\r
316         ual_reg_sidr_cmd,\r
317         ual_sidr_req_cmd,\r
318         ual_sidr_rep_cmd,\r
319 \r
320         al_cm_maxops\r
321 \r
322 } al_cm_sidr_ops_t;\r
323 \r
324 #define AL_CM_OPS_START         IOCTL_CODE(ALDEV_KEY, al_cm_ops_start)\r
325 #define AL_CM_MAXOPS            IOCTL_CODE(ALDEV_KEY, al_cm_maxops)\r
326 #define IS_CM_IOCTL(cmd)                \\r
327         ((cmd) > AL_CM_OPS_START && (cmd) < AL_CM_MAXOPS)\r
328 \r
329 \r
330 typedef enum _ual_cep_ops\r
331 {\r
332         al_cep_ops_start = al_ioc_maxops,\r
333         ual_create_cep,\r
334         ual_destroy_cep,\r
335         ual_cep_listen,\r
336         ual_cep_pre_req,\r
337         ual_cep_send_req,\r
338         ual_cep_pre_rep,\r
339         ual_cep_send_rep,\r
340         ual_cep_get_rtr,\r
341         ual_cep_get_rts,\r
342         ual_cep_rtu,\r
343         ual_cep_rej,\r
344         ual_cep_mra,\r
345         ual_cep_lap,\r
346         ual_cep_pre_apr,\r
347         ual_cep_send_apr,\r
348         ual_cep_dreq,\r
349         ual_cep_drep,\r
350         ual_cep_get_timewait,\r
351         ual_cep_get_event,\r
352         ual_cep_poll,\r
353         ual_cep_get_req_cid,\r
354         ual_cep_get_pdata,\r
355 \r
356         al_cep_maxops\r
357 \r
358 } ual_cep_ops_t;\r
359 \r
360 #define UAL_CEP_OPS_START       IOCTL_CODE(ALDEV_KEY, al_cep_ops_start)\r
361 #define UAL_CEP_MAXOPS          IOCTL_CODE(ALDEV_KEY, al_cep_maxops)\r
362 #define IS_CEP_IOCTL(cmd)               \\r
363         ((cmd) > UAL_CEP_OPS_START && (cmd) < UAL_CEP_MAXOPS)\r
364 \r
365 \r
366 /* AL ioctls */\r
367 \r
368 typedef enum _al_dev_ops\r
369 {\r
370         al_ops_start = al_cep_maxops,\r
371 \r
372         ual_reg_shmid_cmd,\r
373         ual_get_ca_attr,\r
374         ual_reg_pnp_cmd,\r
375         ual_poll_pnp_cmd,\r
376         ual_rearm_pnp_cmd,\r
377         ual_dereg_pnp_cmd,\r
378         \r
379         ual_access_flash,\r
380 \r
381         al_maxops\r
382 \r
383 }       al_dev_ops_t;\r
384 \r
385 #define AL_OPS_START                    IOCTL_CODE(ALDEV_KEY, al_ops_start)\r
386 #define AL_MAXOPS                               IOCTL_CODE(ALDEV_KEY, al_maxops)\r
387 \r
388 #define IS_AL_IOCTL(cmd)                \\r
389         ((cmd) > AL_OPS_START && (cmd) < AL_MAXOPS)\r
390 \r
391 /* NDI ioctls */\r
392 \r
393 typedef enum _al_ndi_ops\r
394 {\r
395         al_ndi_ops_start = al_maxops,\r
396 \r
397         ual_ndi_create_cq_ioctl_cmd,\r
398         ual_ndi_notify_cq_ioctl_cmd,\r
399         ual_ndi_cancel_cq_ioctl_cmd,\r
400         ual_ndi_modify_qp_ioctl_cmd,\r
401         ual_ndi_req_cm_ioctl_cmd,\r
402         ual_ndi_rep_cm_ioctl_cmd,\r
403         ual_ndi_rtu_cm_ioctl_cmd,\r
404         ual_ndi_rej_cm_ioctl_cmd,\r
405         ual_ndi_dreq_cm_ioctl_cmd,\r
406     ual_ndi_noop,\r
407     ual_ndi_notify_dreq_cmd,\r
408 \r
409         al_ndi_maxops\r
410 \r
411 }       al_ndi_ops_t;\r
412 \r
413 #define AL_NDI_OPS_START                        IOCTL_CODE(ALDEV_KEY, al_ndi_ops_start)\r
414 #define AL_NDI_MAXOPS                           IOCTL_CODE(ALDEV_KEY, al_ndi_maxops)\r
415 \r
416 #define IS_NDI_IOCTL(cmd)               \\r
417         ((cmd) > AL_NDI_OPS_START && (cmd) < AL_NDI_MAXOPS)\r
418 \r
419 /* NDI Related ioctl commands */\r
420 #define UAL_NDI_CREATE_CQ               IOCTL_CODE(ALDEV_KEY, ual_ndi_create_cq_ioctl_cmd)\r
421 #define UAL_NDI_NOTIFY_CQ               IOCTL_CODE(ALDEV_KEY, ual_ndi_notify_cq_ioctl_cmd)\r
422 #define UAL_NDI_CANCEL_CQ               IOCTL_CODE(ALDEV_KEY, ual_ndi_cancel_cq_ioctl_cmd)\r
423 #define UAL_NDI_MODIFY_QP               IOCTL_CODE(ALDEV_KEY, ual_ndi_modify_qp_ioctl_cmd)\r
424 #define UAL_NDI_REQ_CM                  IOCTL_CODE(ALDEV_KEY, ual_ndi_req_cm_ioctl_cmd)\r
425 #define UAL_NDI_REP_CM                  IOCTL_CODE(ALDEV_KEY, ual_ndi_rep_cm_ioctl_cmd)\r
426 #define UAL_NDI_RTU_CM                  IOCTL_CODE(ALDEV_KEY, ual_ndi_rtu_cm_ioctl_cmd)\r
427 #define UAL_NDI_REJ_CM                  IOCTL_CODE(ALDEV_KEY, ual_ndi_rej_cm_ioctl_cmd)\r
428 #define UAL_NDI_DREQ_CM                 IOCTL_CODE(ALDEV_KEY, ual_ndi_dreq_cm_ioctl_cmd)\r
429 #define UAL_NDI_NOOP            IOCTL_CODE(ALDEV_KEY, ual_ndi_noop)\r
430 #define UAL_NDI_NOTIFY_DREQ     IOCTL_CODE(ALDEV_KEY, ual_ndi_notify_dreq_cmd)\r
431 \r
432 /*\r
433  * Various Operation Allowable on the System Helper\r
434  */\r
435 \r
436 #define UAL_REG_SHMID           IOCTL_CODE(ALDEV_KEY, ual_reg_shmid_cmd)\r
437 #define UAL_GET_VENDOR_LIBCFG IOCTL_CODE(ALDEV_KEY, ual_get_uvp_name_cmd)\r
438 #define UAL_OPEN_CA                     IOCTL_CODE(ALDEV_KEY, ual_open_ca_ioctl_cmd)\r
439 #define UAL_QUERY_CA            IOCTL_CODE(ALDEV_KEY, ual_query_ca_ioctl_cmd)\r
440 #define UAL_MODIFY_CA           IOCTL_CODE(ALDEV_KEY, ual_modify_ca_ioctl_cmd)\r
441 #define UAL_CLOSE_CA            IOCTL_CODE(ALDEV_KEY, ual_close_ca_ioctl_cmd)\r
442 #define UAL_CI_CALL                     IOCTL_CODE(ALDEV_KEY, ual_ci_call_ioctl_cmd)\r
443 #define UAL_ALLOC_PD            IOCTL_CODE(ALDEV_KEY, ual_alloc_pd_ioctl_cmd)\r
444 #define UAL_DEALLOC_PD          IOCTL_CODE(ALDEV_KEY, ual_dealloc_pd_ioctl_cmd)\r
445 #define UAL_CREATE_AV           IOCTL_CODE(ALDEV_KEY, ual_create_av_ioctl_cmd)\r
446 #define UAL_QUERY_AV            IOCTL_CODE(ALDEV_KEY, ual_query_av_ioctl_cmd)\r
447 #define UAL_MODIFY_AV           IOCTL_CODE(ALDEV_KEY, ual_modify_av_ioctl_cmd)\r
448 #define UAL_DESTROY_AV          IOCTL_CODE(ALDEV_KEY, ual_destroy_av_ioctl_cmd)\r
449 #define UAL_CREATE_SRQ          IOCTL_CODE(ALDEV_KEY, ual_create_srq_ioctl_cmd)\r
450 #define UAL_QUERY_SRQ           IOCTL_CODE(ALDEV_KEY, ual_query_srq_ioctl_cmd)\r
451 #define UAL_MODIFY_SRQ          IOCTL_CODE(ALDEV_KEY, ual_modify_srq_ioctl_cmd)\r
452 #define UAL_DESTROY_SRQ IOCTL_CODE(ALDEV_KEY, ual_destroy_srq_ioctl_cmd)\r
453 #define UAL_CREATE_QP           IOCTL_CODE(ALDEV_KEY, ual_create_qp_ioctl_cmd)\r
454 #define UAL_QUERY_QP            IOCTL_CODE(ALDEV_KEY, ual_query_qp_ioctl_cmd)\r
455 #define UAL_MODIFY_QP           IOCTL_CODE(ALDEV_KEY, ual_modify_qp_ioctl_cmd)\r
456 #define UAL_DESTROY_QP          IOCTL_CODE(ALDEV_KEY, ual_destroy_qp_ioctl_cmd)\r
457 #define UAL_CREATE_CQ           IOCTL_CODE(ALDEV_KEY, ual_create_cq_ioctl_cmd)\r
458 #define UAL_QUERY_CQ            IOCTL_CODE(ALDEV_KEY, ual_query_cq_ioctl_cmd)\r
459 #define UAL_MODIFY_CQ           IOCTL_CODE(ALDEV_KEY, ual_modify_cq_ioctl_cmd)\r
460 #define UAL_DESTROY_CQ          IOCTL_CODE(ALDEV_KEY, ual_destroy_cq_ioctl_cmd)\r
461 #define UAL_REG_MR                      IOCTL_CODE(ALDEV_KEY, ual_reg_mr_ioctl_cmd)\r
462 #define UAL_QUERY_MR            IOCTL_CODE(ALDEV_KEY, ual_query_mr_ioctl_cmd)\r
463 #define UAL_MODIFY_MR           IOCTL_CODE(ALDEV_KEY, ual_rereg_mem_ioctl_cmd)\r
464 #define UAL_REG_SHARED          IOCTL_CODE(ALDEV_KEY, ual_reg_shared_ioctl_cmd)\r
465 #define UAL_DEREG_MR            IOCTL_CODE(ALDEV_KEY, ual_dereg_mr_ioctl_cmd)\r
466 #define UAL_CREATE_MW           IOCTL_CODE(ALDEV_KEY, ual_create_mw_ioctl_cmd)\r
467 #define UAL_QUERY_MW            IOCTL_CODE(ALDEV_KEY, ual_query_mw_ioctl_cmd)\r
468 #define UAL_BIND_MW                     IOCTL_CODE(ALDEV_KEY, ual_bind_mw_ioctl_cmd)\r
469 #define UAL_DESTROY_MW          IOCTL_CODE(ALDEV_KEY, ual_destroy_mw_ioctl_cmd)\r
470 #define UAL_POST_SEND           IOCTL_CODE(ALDEV_KEY, ual_post_send_ioctl_cmd)\r
471 #define UAL_POST_RECV           IOCTL_CODE(ALDEV_KEY, ual_post_recv_ioctl_cmd)\r
472 #define UAL_POST_SRQ_RECV       IOCTL_CODE(ALDEV_KEY, ual_post_srq_recv_ioctl_cmd)\r
473 #define UAL_PEEK_CQ                     IOCTL_CODE(ALDEV_KEY, ual_peek_cq_ioctl_cmd)\r
474 #define UAL_POLL_CQ                     IOCTL_CODE(ALDEV_KEY, ual_poll_cq_ioctl_cmd)\r
475 #define UAL_REARM_CQ            IOCTL_CODE(ALDEV_KEY, ual_rearm_cq_ioctl_cmd)\r
476 #define UAL_REARM_N_CQ          IOCTL_CODE(ALDEV_KEY, ual_rearm_n_cq_ioctl_cmd)\r
477 #define UAL_ATTACH_MCAST        IOCTL_CODE(ALDEV_KEY, ual_attach_mcast_ioctl_cmd)\r
478 #define UAL_DETACH_MCAST        IOCTL_CODE(ALDEV_KEY, ual_detach_mcast_ioctl_cmd)\r
479 \r
480 /* Subnet management related ioctl commands */\r
481 #define UAL_REG_SVC                     IOCTL_CODE(ALDEV_KEY, ual_reg_svc_cmd)\r
482 #define UAL_DEREG_SVC           IOCTL_CODE(ALDEV_KEY, ual_dereg_svc_cmd)\r
483 #define UAL_SEND_SA_REQ         IOCTL_CODE(ALDEV_KEY, ual_send_sa_req_cmd)\r
484 #define UAL_CANCEL_SA_REQ       IOCTL_CODE(ALDEV_KEY, ual_cancel_sa_req_cmd)\r
485 #define UAL_MAD_SEND            IOCTL_CODE(ALDEV_KEY, ual_mad_send_cmd)\r
486 #define UAL_INIT_DGRM_SVC       IOCTL_CODE(ALDEV_KEY, ual_init_dgram_svc_cmd)\r
487 #define UAL_REG_MAD_SVC         IOCTL_CODE(ALDEV_KEY, ual_reg_mad_svc_cmd)\r
488 #define UAL_DEREG_MAD_SVC       IOCTL_CODE(ALDEV_KEY, ual_dereg_mad_svc_cmd)\r
489 #define UAL_REG_MAD_POOL        IOCTL_CODE(ALDEV_KEY, ual_reg_mad_pool_cmd)\r
490 #define UAL_DEREG_MAD_POOL      IOCTL_CODE(ALDEV_KEY, ual_dereg_mad_pool_cmd)\r
491 #define UAL_CANCEL_MAD          IOCTL_CODE(ALDEV_KEY, ual_cancel_mad_cmd)\r
492 #define UAL_GET_SPL_QP_ALIAS IOCTL_CODE(ALDEV_KEY, ual_get_spl_qp_cmd)\r
493 #define UAL_MAD_RECV_COMP       IOCTL_CODE(ALDEV_KEY, ual_mad_recv_comp_cmd)\r
494 #define UAL_LOCAL_MAD           IOCTL_CODE(ALDEV_KEY, ual_local_mad_cmd)\r
495 \r
496 /* CM Related ioctl commands */\r
497 #define UAL_CM_LISTEN           IOCTL_CODE(ALDEV_KEY, ual_cm_listen_cmd)\r
498 #define UAL_CM_CANCEL           IOCTL_CODE(ALDEV_KEY, ual_cm_cancel_cmd)\r
499 #define UAL_CM_REQ                      IOCTL_CODE(ALDEV_KEY, ual_cm_req_cmd)\r
500 #define UAL_CM_REP                      IOCTL_CODE(ALDEV_KEY, ual_cm_rep_cmd)\r
501 #define UAL_CM_RTU                      IOCTL_CODE(ALDEV_KEY, ual_cm_rtu_cmd)\r
502 #define UAL_CM_REJ                      IOCTL_CODE(ALDEV_KEY, ual_cm_rej_cmd)\r
503 #define UAL_CM_HANDOFF          IOCTL_CODE(ALDEV_KEY, ual_cm_handoff_cmd)\r
504 #define UAL_CM_DREQ                     IOCTL_CODE(ALDEV_KEY, ual_cm_dreq_cmd)\r
505 #define UAL_CM_DREP                     IOCTL_CODE(ALDEV_KEY, ual_cm_drep_cmd)\r
506 #define UAL_CM_MRA                      IOCTL_CODE(ALDEV_KEY, ual_cm_mra_cmd)\r
507 #define UAL_CM_LAP                      IOCTL_CODE(ALDEV_KEY, ual_cm_lap_cmd)\r
508 #define UAL_CM_APR                      IOCTL_CODE(ALDEV_KEY, ual_cm_apr_cmd)\r
509 #define UAL_CM_FORCE_APM        IOCTL_CODE(ALDEV_KEY, ual_force_apm_cmd)\r
510 \r
511 /* CEP Related IOCTL commands */\r
512 #define UAL_CREATE_CEP          IOCTL_CODE(ALDEV_KEY, ual_create_cep)\r
513 #define UAL_DESTROY_CEP         IOCTL_CODE(ALDEV_KEY, ual_destroy_cep)\r
514 #define UAL_CEP_LISTEN          IOCTL_CODE(ALDEV_KEY, ual_cep_listen)\r
515 #define UAL_CEP_PRE_REQ         IOCTL_CODE(ALDEV_KEY, ual_cep_pre_req)\r
516 #define UAL_CEP_SEND_REQ        IOCTL_CODE(ALDEV_KEY, ual_cep_send_req)\r
517 #define UAL_CEP_PRE_REP         IOCTL_CODE(ALDEV_KEY, ual_cep_pre_rep)\r
518 #define UAL_CEP_SEND_REP        IOCTL_CODE(ALDEV_KEY, ual_cep_send_rep)\r
519 #define UAL_CEP_GET_RTR         IOCTL_CODE(ALDEV_KEY, ual_cep_get_rtr)\r
520 #define UAL_CEP_GET_RTS         IOCTL_CODE(ALDEV_KEY, ual_cep_get_rts)\r
521 #define UAL_CEP_RTU                     IOCTL_CODE(ALDEV_KEY, ual_cep_rtu)\r
522 #define UAL_CEP_REJ                     IOCTL_CODE(ALDEV_KEY, ual_cep_rej)\r
523 #define UAL_CEP_MRA                     IOCTL_CODE(ALDEV_KEY, ual_cep_mra)\r
524 #define UAL_CEP_LAP                     IOCTL_CODE(ALDEV_KEY, ual_cep_lap)\r
525 #define UAL_CEP_PRE_APR         IOCTL_CODE(ALDEV_KEY, ual_cep_pre_apr)\r
526 #define UAL_CEP_SEND_APR        IOCTL_CODE(ALDEV_KEY, ual_cep_send_apr)\r
527 #define UAL_CEP_DREQ            IOCTL_CODE(ALDEV_KEY, ual_cep_dreq)\r
528 #define UAL_CEP_DREP            IOCTL_CODE(ALDEV_KEY, ual_cep_drep)\r
529 #define UAL_CEP_GET_TIMEWAIT    IOCTL_CODE(ALDEV_KEY, ual_cep_get_timewait)\r
530 #define UAL_CEP_GET_EVENT       IOCTL_CODE(ALDEV_KEY, ual_cep_get_event)\r
531 #define UAL_CEP_POLL            IOCTL_CODE(ALDEV_KEY, ual_cep_poll)\r
532 #define UAL_CEP_GET_REQ_CID     IOCTL_CODE(ALDEV_KEY, ual_cep_get_req_cid)\r
533 #define UAL_CEP_GET_PDATA       IOCTL_CODE(ALDEV_KEY, ual_cep_get_pdata)\r
534 \r
535 \r
536 #define UAL_GET_CA_ATTR_INFO    IOCTL_CODE(ALDEV_KEY, ual_get_ca_attr)\r
537 \r
538 /* PnP related ioctl commands. */\r
539 #define UAL_REG_PNP                     IOCTL_CODE(ALDEV_KEY, ual_reg_pnp_cmd)\r
540 #define UAL_POLL_PNP            IOCTL_CODE(ALDEV_KEY, ual_poll_pnp_cmd)\r
541 #define UAL_REARM_PNP           IOCTL_CODE(ALDEV_KEY, ual_rearm_pnp_cmd)\r
542 #define UAL_DEREG_PNP           IOCTL_CODE(ALDEV_KEY, ual_dereg_pnp_cmd)\r
543 #define UAL_ACCESS_FLASH        IOCTL_CODE(ALDEV_KEY, ual_access_flash)\r
544 \r
545 #endif  /* _AL_DEV_H_ */\r