[SRP] Add WPP
[mirror/winof/.git] / ulp / srp / kernel / srp_descriptors.c
1 /*\r
2  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
3  *\r
4  * This software is available to you under the OpenIB.org BSD license\r
5  * below:\r
6  *\r
7  *     Redistribution and use in source and binary forms, with or\r
8  *     without modification, are permitted provided that the following\r
9  *     conditions are met:\r
10  *\r
11  *      - Redistributions of source code must retain the above\r
12  *        copyright notice, this list of conditions and the following\r
13  *        disclaimer.\r
14  *\r
15  *      - Redistributions in binary form must reproduce the above\r
16  *        copyright notice, this list of conditions and the following\r
17  *        disclaimer in the documentation and/or other materials\r
18  *        provided with the distribution.\r
19  *\r
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
23  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
24  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
25  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
26  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
27  * SOFTWARE.\r
28  *\r
29  * $Id$\r
30  */\r
31 \r
32 \r
33 #include "srp_connection.h"\r
34 #include "srp_cmd.h"\r
35 #include "srp_data_path.h"\r
36 #include "srp_descriptors.h"\r
37 #if defined(EVENT_TRACING)\r
38 #ifdef offsetof\r
39 #undef offsetof\r
40 #endif\r
41 #include "srp_descriptors.tmh"\r
42 #endif\r
43 #include "srp_rsp.h"\r
44 #include "srp_session.h"\r
45 #include "srp_tsk_mgmt.h"\r
46 \r
47 /* __srp_create_recv_descriptors */\r
48 /*!\r
49 Creates the receive descriptors and posts them to the receive queue\r
50 \r
51 @param p_descriptors    - pointer to the work requests structure\r
52 @param h_pd             - protection domain used for registration of memory\r
53 @param h_qp             - queue pair used to post work requests\r
54 \r
55 @return - result of operations\r
56 */\r
57 static ib_api_status_t\r
58 __srp_create_recv_descriptors(\r
59         IN      OUT                     srp_descriptors_t                       *p_descriptors,\r
60         IN                              ib_al_ifc_t* const                      p_ifc,\r
61         IN                              ib_pd_handle_t                          h_pd,\r
62         IN                              ib_qp_handle_t                          h_qp )\r
63 {\r
64         ib_api_status_t         status = IB_SUCCESS;\r
65         srp_recv_descriptor_t   *p_descriptor;\r
66         uint8_t                 *p_data_segment;\r
67         ib_mr_create_t          mr_create;\r
68         uint32_t                i;\r
69 \r
70         SRP_ENTER( SRP_DBG_PNP );\r
71 \r
72         /* Create the array of recv descriptors */\r
73         p_descriptors->p_recv_descriptors_array =\r
74                 (srp_recv_descriptor_t *)cl_zalloc( p_descriptors->recv_descriptor_count * sizeof(srp_recv_descriptor_t) );\r
75         if ( p_descriptors->p_recv_descriptors_array == NULL )\r
76         {\r
77                 SRP_PRINT( TRACE_LEVEL_ERROR, SRP_DBG_ERROR,\r
78                         ("Failed to allocate %d recv descriptors.\n",  p_descriptors->recv_descriptor_count) );\r
79                 status = IB_INSUFFICIENT_MEMORY;\r
80                 goto exit;\r
81         }\r
82 \r
83         /* Create the array of recv data segments */\r
84         p_descriptors->p_recv_data_segments_array =\r
85                 cl_zalloc( p_descriptors->recv_descriptor_count * p_descriptors->recv_data_segment_size );\r
86         if ( p_descriptors->p_recv_data_segments_array == NULL )\r
87         {\r
88                 SRP_PRINT( TRACE_LEVEL_ERROR, SRP_DBG_ERROR,\r
89                         ("Failed to allocate %d recv data segments of %d length.\n",\r
90                         p_descriptors->recv_descriptor_count,\r
91                         p_descriptors->recv_data_segment_size) );\r
92 \r
93                 cl_free( p_descriptors->p_recv_descriptors_array );\r
94                 p_descriptors->p_recv_descriptors_array = NULL;\r
95                 status = IB_INSUFFICIENT_MEMORY;\r
96                 goto exit;\r
97         }\r
98 \r
99         /* Register the data segments array memory */\r
100         mr_create.vaddr = p_descriptors->p_recv_data_segments_array;\r
101         mr_create.length = p_descriptors->recv_descriptor_count * p_descriptors->recv_data_segment_size;\r
102         mr_create.access_ctrl = IB_AC_LOCAL_WRITE;\r
103 \r
104         status = p_ifc->reg_mem( h_pd,\r
105                                                  &mr_create,\r
106                                                  &p_descriptors->recv_lkey,\r
107                                                  &p_descriptors->recv_rkey,\r
108                                                  &p_descriptors->h_recv_mr );\r
109         if ( status != IB_SUCCESS )\r
110         {\r
111                 SRP_PRINT( TRACE_LEVEL_ERROR, SRP_DBG_ERROR,\r
112                         ("Failed to register recv data segments. Status = %d.\n", status) );\r
113 \r
114                 cl_free( p_descriptors->p_recv_data_segments_array );\r
115                 p_descriptors->p_recv_data_segments_array = NULL;\r
116 \r
117                 cl_free( p_descriptors->p_recv_descriptors_array );\r
118                 p_descriptors->p_recv_descriptors_array = NULL;\r
119                 goto exit;\r
120         }\r
121 \r
122         /* Initialize them and post to receive queue */\r
123         p_descriptor = p_descriptors->p_recv_descriptors_array;\r
124         p_data_segment = p_descriptors->p_recv_data_segments_array;\r
125 \r
126         for ( i = 0; i < p_descriptors->recv_descriptor_count; i++ )\r
127         {\r
128                 p_descriptor->wr.p_next = NULL;\r
129                 p_descriptor->wr.wr_id = (uint64_t)((void* __ptr64)p_descriptor);\r
130                 p_descriptor->wr.num_ds = 1;\r
131                 p_descriptor->wr.ds_array = p_descriptor->ds;\r
132 \r
133                 p_descriptor->ds[0].vaddr = (uint64_t)((void* __ptr64)p_data_segment);\r
134                 p_descriptor->ds[0].length = p_descriptors->recv_data_segment_size;\r
135                 p_descriptor->ds[0].lkey = p_descriptors->recv_lkey;\r
136 \r
137                 p_descriptors->p_recv_descriptors_array[i].p_data_segment = p_data_segment;\r
138 \r
139                 status = p_ifc->post_recv( h_qp, &p_descriptor->wr, NULL );\r
140                 if ( status != IB_SUCCESS )\r
141                 {\r
142                         SRP_PRINT( TRACE_LEVEL_ERROR, SRP_DBG_ERROR,\r
143                                 ("Failed to post recv descriptor. Status = %d.\n", status) );\r
144                         goto exit;\r
145                 }\r
146 \r
147                 p_descriptor++;\r
148                 p_data_segment += p_descriptors->recv_data_segment_size;\r
149         }\r
150 \r
151 exit:\r
152         SRP_EXIT( SRP_DBG_PNP );\r
153 \r
154         return ( status );\r
155 }\r
156 \r
157 /* srp_init_descriptors */\r
158 /*!\r
159 Orchestrates creation of receive descriptor buffers and sent list\r
160 \r
161 @param p_descriptors          - pointer to the descriptors structure\r
162 @param recv descriptor_count  - number of receive descriptors to create\r
163 @param recv data_segment_size - size of each receive descriptor's data area\r
164 @param h_pd                   - protection domain used for registration of memory\r
165 @param h_qp                   - queue pair used to post work requests\r
166 \r
167 @return - result of operations\r
168 */\r
169 ib_api_status_t\r
170 srp_init_descriptors(\r
171         IN      OUT                     srp_descriptors_t                       *p_descriptors,\r
172         IN                              uint32_t                                        recv_descriptor_count,\r
173         IN                              uint32_t                                        recv_data_segment_size,\r
174         IN                              ib_al_ifc_t* const                      p_ifc,\r
175         IN                              ib_pd_handle_t                          h_pd,\r
176         IN                              ib_qp_handle_t                          h_qp )\r
177 {\r
178         ib_api_status_t status;\r
179 \r
180         SRP_ENTER( SRP_DBG_PNP );\r
181 \r
182         CL_ASSERT( p_descriptors != NULL );\r
183 \r
184         cl_memclr( p_descriptors, sizeof(*p_descriptors) );\r
185 \r
186         cl_spinlock_init ( &p_descriptors->sent_list_lock );\r
187         cl_qlist_init( &p_descriptors->sent_descriptors );\r
188 \r
189         p_descriptors->initialized = TRUE;\r
190 \r
191         p_descriptors->recv_descriptor_count = recv_descriptor_count;\r
192         p_descriptors->recv_data_segment_size = recv_data_segment_size;\r
193 \r
194         status = __srp_create_recv_descriptors( p_descriptors, p_ifc, h_pd, h_qp );\r
195         if ( status != IB_SUCCESS )\r
196         {\r
197                 srp_destroy_descriptors( p_descriptors );\r
198         }\r
199 \r
200         SRP_EXIT( SRP_DBG_PNP );\r
201 \r
202         return ( status );\r
203 }\r
204 \r
205 /* srp_destroy_descriptors */\r
206 /*!\r
207 Destroys the receive work request buffers\r
208 \r
209 @param p_descriptors - pointer to the descriptors structure\r
210 \r
211 @return - result of operations\r
212 */\r
213 ib_api_status_t\r
214 srp_destroy_descriptors(\r
215         IN OUT  srp_descriptors_t   *p_descriptors )\r
216 {\r
217         SRP_ENTER( SRP_DBG_PNP );\r
218 \r
219         if ( p_descriptors->initialized == TRUE )\r
220         {\r
221                 cl_spinlock_destroy ( &p_descriptors->sent_list_lock );\r
222 \r
223                 if ( p_descriptors->p_recv_data_segments_array != NULL )\r
224                 {\r
225                         cl_free( p_descriptors->p_recv_data_segments_array );\r
226                 }\r
227 \r
228                 if ( p_descriptors->p_recv_descriptors_array != NULL )\r
229                 {\r
230                         cl_free( p_descriptors->p_recv_descriptors_array );\r
231                 }\r
232 \r
233                 cl_memclr( p_descriptors, sizeof( *p_descriptors ) );\r
234         }\r
235 \r
236         SRP_EXIT( SRP_DBG_PNP );\r
237 \r
238         return IB_SUCCESS;\r
239 }\r
240 \r
241 /* srp_add_send_descriptor */\r
242 /*!\r
243 Puts send descriptor at tail of the sent list\r
244 \r
245 @param p_descriptors - pointer to the descriptors structure\r
246 @param p_descriptor  - pointer to the descriptor to add\r
247 \r
248 @return - none\r
249 */\r
250 inline\r
251 void\r
252 srp_add_send_descriptor(\r
253         IN  srp_descriptors_t       *p_descriptors,\r
254         IN  srp_send_descriptor_t   *p_descriptor )\r
255 {\r
256         SRP_ENTER( SRP_DBG_DEBUG );\r
257 \r
258         cl_spinlock_acquire ( &p_descriptors->sent_list_lock );\r
259 \r
260         cl_qlist_insert_tail( &p_descriptors->sent_descriptors, &p_descriptor->list_item );\r
261         CL_ASSERT( &p_descriptors->sent_descriptors == p_descriptor->list_item.p_list );\r
262 \r
263         cl_spinlock_release ( &p_descriptors->sent_list_lock );\r
264 \r
265         SRP_EXIT( SRP_DBG_DEBUG );\r
266 }\r
267 \r
268 /* srp_remove_send_descriptor */\r
269 /*!\r
270 Removes send descriptor from the sent list\r
271 \r
272 @param p_descriptors - pointer to the descriptors structure\r
273 @param p_descriptor  - pointer to the descriptor to add\r
274 \r
275 @return - none\r
276 */\r
277 inline\r
278 void\r
279 srp_remove_send_descriptor(\r
280         IN  srp_descriptors_t       *p_descriptors,\r
281         IN  srp_send_descriptor_t   *p_descriptor )\r
282 {\r
283         SRP_ENTER( SRP_DBG_DEBUG );\r
284 \r
285         cl_spinlock_acquire ( &p_descriptors->sent_list_lock );\r
286 \r
287         CL_ASSERT( &p_descriptors->sent_descriptors == p_descriptor->list_item.p_list );\r
288         cl_qlist_remove_item( &p_descriptors->sent_descriptors, &p_descriptor->list_item );\r
289 \r
290         cl_spinlock_release ( &p_descriptors->sent_list_lock );\r
291 \r
292         SRP_EXIT( SRP_DBG_DEBUG );\r
293 }\r
294 \r
295 /* srp_remove_lun_head_send_descriptor */\r
296 /*!\r
297 Removes and returns the send descriptor from the head of the sent list for the lun specified\r
298 \r
299 @param p_descriptors - pointer to the descriptors structure\r
300 @param lun           - lun for which to remove head send descriptor\r
301 \r
302 @return - srp_send_descriptor at head of sent list or NULL if empty\r
303 */\r
304 srp_send_descriptor_t*\r
305 srp_remove_lun_head_send_descriptor(\r
306         IN      srp_descriptors_t       *p_descriptors,\r
307         IN      UCHAR                   lun )\r
308 {\r
309         srp_send_descriptor_t   *p_descriptor;\r
310 \r
311         SRP_ENTER( SRP_DBG_DEBUG );\r
312 \r
313         cl_spinlock_acquire ( &p_descriptors->sent_list_lock );\r
314 \r
315         p_descriptor = (srp_send_descriptor_t *)cl_qlist_head( &p_descriptors->sent_descriptors );\r
316         CL_ASSERT( &p_descriptors->sent_descriptors == p_descriptor->list_item.p_list );\r
317 \r
318         while ( p_descriptor != (srp_send_descriptor_t *)cl_qlist_end( &p_descriptors->sent_descriptors ) )\r
319         {\r
320                 if ( p_descriptor->p_srb->Lun == lun )\r
321                 {\r
322                         CL_ASSERT( &p_descriptors->sent_descriptors == p_descriptor->list_item.p_list );\r
323                         cl_qlist_remove_item( &p_descriptors->sent_descriptors, &p_descriptor->list_item );\r
324                         break;\r
325                 }\r
326 \r
327                 p_descriptor = (srp_send_descriptor_t *)cl_qlist_next( &p_descriptor->list_item );\r
328                 CL_ASSERT( &p_descriptors->sent_descriptors == p_descriptor->list_item.p_list );\r
329         }\r
330 \r
331         if ( p_descriptor == (srp_send_descriptor_t *)cl_qlist_end( &p_descriptors->sent_descriptors ) )\r
332         {\r
333                 p_descriptor = NULL;\r
334         }\r
335 \r
336         cl_spinlock_release ( &p_descriptors->sent_list_lock );\r
337 \r
338         SRP_EXIT( SRP_DBG_DEBUG );\r
339 \r
340         return ( p_descriptor );\r
341 }\r
342 \r
343 /* srp_post_send_descriptor */\r
344 /*!\r
345 Posts send descriptor across the connection specified and\r
346 if successful add it to the sent descriptors list\r
347 \r
348 @param p_descriptors - pointer to the descriptors structure\r
349 @param p_descriptor  - pointer to the descriptor to send\r
350 @param p_session     - pointer to the session used to send\r
351 \r
352 @return - result of post operation, or IB_ERROR if not connected\r
353 */\r
354 ib_api_status_t\r
355 srp_post_send_descriptor(\r
356         IN                              srp_descriptors_t                       *p_descriptors,\r
357         IN                              srp_send_descriptor_t           *p_descriptor,\r
358         IN                              srp_session_t                           *p_session )\r
359 {\r
360         ib_api_status_t         status = IB_ERROR;\r
361         srp_connection_t        *p_connection;\r
362         ib_al_ifc_t                     *p_ifc;\r
363 \r
364         SRP_ENTER( SRP_DBG_DEBUG );\r
365 \r
366         p_connection = &p_session->connection;\r
367         p_ifc = &p_session->hca.p_hba->ifc;\r
368 \r
369         if ( p_connection->state == SRP_CONNECTED )\r
370         {\r
371                 SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
372                         ("wr_id    = 0x%I64x.\n", p_descriptor->wr.wr_id) );\r
373                 SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
374                         ("wr_type  = 0x%x.\n", p_descriptor->wr.wr_type) );\r
375                 SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
376                         ("send_opt = 0x%x.\n", p_descriptor->wr.send_opt) );\r
377                 SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
378                         ("num_ds   = 0x%x.\n", p_descriptor->wr.num_ds) );\r
379 \r
380                 SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
381                                    ("Posting  I/O for Function = %s(0x%x), Path = 0x%x, "\r
382                                    "Target = 0x%x, Lun = 0x%x, tag 0x%I64x\n",\r
383                                    g_srb_function_name[p_descriptor->p_srb->Function],\r
384                                    p_descriptor->p_srb->Function,\r
385                                    p_descriptor->p_srb->PathId,\r
386                                    p_descriptor->p_srb->TargetId,\r
387                                    p_descriptor->p_srb->Lun,\r
388                                    get_srp_command_tag( (srp_cmd_t *)p_descriptor->data_segment )) );\r
389 \r
390                 if ( get_srp_iu_buffer_type( (srp_iu_buffer_t *)p_descriptor->data_segment ) == SRP_CMD )\r
391                 {\r
392                         p_descriptor->ds[0].length = get_srp_command_length( (srp_cmd_t *)p_descriptor->data_segment );\r
393                 }\r
394                 else /* task type */\r
395                 {\r
396                         p_descriptor->ds[0].length = get_srp_tsk_mgmt_length( (srp_tsk_mgmt_t *)p_descriptor->data_segment );\r
397                 }\r
398 \r
399                 ASSERT( p_descriptor->ds[0].length <= p_connection->init_to_targ_iu_sz );\r
400 \r
401                 srp_add_send_descriptor( p_descriptors, p_descriptor );\r
402 \r
403                 status = p_ifc->post_send(\r
404                         p_connection->h_qp, &p_descriptor->wr, NULL );\r
405                 if ( status != IB_SUCCESS )\r
406                 {\r
407                         /* Remove From Sent List */\r
408                         srp_remove_send_descriptor( p_descriptors, p_descriptor );\r
409                         SRP_PRINT( TRACE_LEVEL_ERROR, SRP_DBG_ERROR,\r
410                                                 ("Failed to post send descriptor. "\r
411                                                 "ib_post_send status = 0x%x tag = 0x%I64x\n",\r
412                                                 status,\r
413                                                 get_srp_command_tag( (srp_cmd_t *)p_descriptor->data_segment )) );\r
414                 }\r
415         }\r
416         else\r
417         {\r
418                 SRP_PRINT( TRACE_LEVEL_ERROR, SRP_DBG_ERROR,\r
419                         ("Attempting to post to an unconnected session.\n") );\r
420         }\r
421 \r
422         SRP_EXIT( SRP_DBG_DEBUG );\r
423 \r
424         return ( status );\r
425 }\r
426 \r
427 /* srp_find_matching_send_descriptor */\r
428 /*!\r
429 Given a received response find the matching send descriptor\r
430 which originated the request to the VFx and remove it from\r
431 the sent descriptor list\r
432 \r
433 @param p_descriptors - pointer to the descriptors structure\r
434 @param tag           - tag of descriptor to find\r
435 \r
436 @return - pointer to send descriptor or NULL if not found\r
437 */\r
438 srp_send_descriptor_t*\r
439 srp_find_matching_send_descriptor(\r
440         IN      srp_descriptors_t   *p_descriptors,\r
441         IN      uint64_t            tag )\r
442 {\r
443         srp_send_descriptor_t   *p_send_descriptor;\r
444 \r
445         SRP_ENTER( SRP_DBG_DEBUG );\r
446 \r
447         cl_spinlock_acquire( &p_descriptors->sent_list_lock );\r
448 \r
449         p_send_descriptor = (srp_send_descriptor_t *)cl_qlist_head( &p_descriptors->sent_descriptors );\r
450         CL_ASSERT( &p_descriptors->sent_descriptors == p_send_descriptor->list_item.p_list );\r
451 \r
452         SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
453                 ("rsp tag = 0x%I64x.\n", tag) );\r
454 \r
455         while ( p_send_descriptor != (srp_send_descriptor_t *)cl_qlist_end( &p_descriptors->sent_descriptors ) )\r
456         {\r
457                 SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG, ("cmd tag = 0x%I64x.\n",\r
458                         get_srp_command_tag( (srp_cmd_t *)p_send_descriptor->data_segment )) );\r
459 \r
460                 if ( get_srp_command_tag( (srp_cmd_t *)p_send_descriptor->data_segment ) == tag )\r
461                 {\r
462                         CL_ASSERT( &p_descriptors->sent_descriptors == p_send_descriptor->list_item.p_list );\r
463                         cl_qlist_remove_item( &p_descriptors->sent_descriptors, &p_send_descriptor->list_item );\r
464                         goto exit;\r
465                 }\r
466 \r
467                 p_send_descriptor = (srp_send_descriptor_t *)cl_qlist_next( &p_send_descriptor->list_item );\r
468         }\r
469 \r
470         /* This is not an error. The request may have been aborted */\r
471         p_send_descriptor = NULL;\r
472 \r
473 exit:\r
474         cl_spinlock_release( &p_descriptors->sent_list_lock );\r
475 \r
476         SRP_EXIT( SRP_DBG_DEBUG );\r
477 \r
478         return ( p_send_descriptor );\r
479 }\r
480 \r
481 /* srp_build_send_descriptor */\r
482 /*!\r
483 Initializes a send descriptor's fields\r
484 \r
485 @param p_dev_ext       - our context pointer\r
486 @param p_srb           - scsi request to send to target\r
487 @param p_srp_conn_info - information about our connection to the VFx\r
488 \r
489 @return - none\r
490 */\r
491 void\r
492 srp_build_send_descriptor(\r
493         IN      PVOID               p_dev_ext,\r
494         IN OUT  PSCSI_REQUEST_BLOCK p_srb,\r
495         IN      p_srp_conn_info_t   p_srp_conn_info )\r
496 {\r
497         srp_send_descriptor_t   *p_send_descriptor = (srp_send_descriptor_t *)p_srb->SrbExtension;\r
498         STOR_PHYSICAL_ADDRESS   physical_address;\r
499         ULONG                   length;\r
500 \r
501         SRP_ENTER( SRP_DBG_DEBUG );\r
502 \r
503         cl_memclr( p_send_descriptor, (sizeof ( srp_send_descriptor_t ) - SRP_MAX_IU_SIZE) );\r
504 \r
505         physical_address = StorPortGetPhysicalAddress( p_dev_ext, p_srb, p_send_descriptor->data_segment, &length );\r
506 \r
507         p_send_descriptor->wr.wr_id = (uint64_t)((uintn_t)p_send_descriptor);\r
508         p_send_descriptor->wr.wr_type = WR_SEND;\r
509         p_send_descriptor->wr.send_opt = (p_srp_conn_info->signal_send_completion == TRUE) ? IB_SEND_OPT_SIGNALED : 0;\r
510         p_send_descriptor->wr.num_ds = 1;\r
511         p_send_descriptor->wr.ds_array = p_send_descriptor->ds;\r
512         p_send_descriptor->tag = p_srp_conn_info->tag;\r
513         p_send_descriptor->p_srb = p_srb;\r
514         p_send_descriptor->ds[0].vaddr = p_srp_conn_info->vaddr + physical_address.QuadPart;\r
515         p_send_descriptor->ds[0].length =  p_srp_conn_info->init_to_targ_iu_sz;\r
516         p_send_descriptor->ds[0].lkey =   p_srp_conn_info->lkey;\r
517 \r
518         SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
519                 ("hca vaddr        = 0x%I64x.\n", p_srp_conn_info->vaddr));\r
520         SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
521                 ("physical_address = 0x%I64x.\n", physical_address.QuadPart));\r
522         SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
523                 ("IU  vaddr        = 0x%I64x.\n", p_send_descriptor->ds[0].vaddr));\r
524         SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
525                 ("length           = %d.\n",          p_send_descriptor->ds[0].length));\r
526         SRP_PRINT( TRACE_LEVEL_VERBOSE, SRP_DBG_DEBUG,\r
527                 ("lkey             = 0x%x.\n",        p_send_descriptor->ds[0].lkey));\r
528 \r
529         SRP_EXIT( SRP_DBG_DEBUG );\r
530 }\r