aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorErez Zilber <erezz@voltaire.com>2006-09-11 05:24:00 -0400
committerRoland Dreier <rolandd@cisco.com>2006-09-22 18:22:51 -0400
commite981f1d4b8288072ba7cf6b7141cd4aefb404383 (patch)
treeb33851f7b985ea86c11a5e99c523fbcf97c12bd3 /drivers/infiniband/ulp
parent8dfa0876d3dde5f9c1818a4c35caaabc3ddba78b (diff)
IB/iser: fix some debug prints
fix and add some debug prints related to iser handling of memory for rdma. Signed-off-by: Erez Zilber <erezz@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/iser/iser_memory.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c
index bcef0d31f756..8fea0bce5042 100644
--- a/drivers/infiniband/ulp/iser/iser_memory.c
+++ b/drivers/infiniband/ulp/iser/iser_memory.c
@@ -329,9 +329,9 @@ static void iser_data_buf_dump(struct iser_data_buf *data)
329 struct scatterlist *sg = (struct scatterlist *)data->buf; 329 struct scatterlist *sg = (struct scatterlist *)data->buf;
330 int i; 330 int i;
331 331
332 for (i = 0; i < data->size; i++) 332 for (i = 0; i < data->dma_nents; i++)
333 iser_err("sg[%d] dma_addr:0x%lX page:0x%p " 333 iser_err("sg[%d] dma_addr:0x%lX page:0x%p "
334 "off:%d sz:%d dma_len:%d\n", 334 "off:0x%x sz:0x%x dma_len:0x%x\n",
335 i, (unsigned long)sg_dma_address(&sg[i]), 335 i, (unsigned long)sg_dma_address(&sg[i]),
336 sg[i].page, sg[i].offset, 336 sg[i].page, sg[i].offset,
337 sg[i].length,sg_dma_len(&sg[i])); 337 sg[i].length,sg_dma_len(&sg[i]));
@@ -383,6 +383,7 @@ int iser_reg_rdma_mem(struct iscsi_iser_cmd_task *iser_ctask,
383 struct iser_regd_buf *regd_buf; 383 struct iser_regd_buf *regd_buf;
384 int aligned_len; 384 int aligned_len;
385 int err; 385 int err;
386 int i;
386 387
387 regd_buf = &iser_ctask->rdma_regd[cmd_dir]; 388 regd_buf = &iser_ctask->rdma_regd[cmd_dir];
388 389
@@ -400,8 +401,18 @@ int iser_reg_rdma_mem(struct iscsi_iser_cmd_task *iser_ctask,
400 401
401 iser_page_vec_build(mem, ib_conn->page_vec); 402 iser_page_vec_build(mem, ib_conn->page_vec);
402 err = iser_reg_page_vec(ib_conn, ib_conn->page_vec, &regd_buf->reg); 403 err = iser_reg_page_vec(ib_conn, ib_conn->page_vec, &regd_buf->reg);
403 if (err) 404 if (err) {
405 iser_data_buf_dump(mem);
406 iser_err("mem->dma_nents = %d (dlength = 0x%x)\n", mem->dma_nents,
407 ntoh24(iser_ctask->desc.iscsi_header.dlength));
408 iser_err("page_vec: data_size = 0x%x, length = %d, offset = 0x%x\n",
409 ib_conn->page_vec->data_size, ib_conn->page_vec->length,
410 ib_conn->page_vec->offset);
411 for (i=0 ; i<ib_conn->page_vec->length ; i++) {
412 iser_err("page_vec[%d] = 0x%lx\n", i, ib_conn->page_vec->pages[i]);
413 }
404 return err; 414 return err;
415 }
405 416
406 /* take a reference on this regd buf such that it will not be released * 417 /* take a reference on this regd buf such that it will not be released *
407 * (eg in send dto completion) before we get the scsi response */ 418 * (eg in send dto completion) before we get the scsi response */