diff options
author | Eli Dorfman <dorfman.eli@gmail.com> | 2008-04-29 16:46:52 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-29 16:46:52 -0400 |
commit | 6f735e36bad6fa4949271b3c3d0f331aad812313 (patch) | |
tree | eff436b7e4126b28a59dd7cc9c71e1fca783ce66 /drivers/infiniband | |
parent | 7df109d917e85d3da2e25bd495c4997e87ed2a4e (diff) |
IB/iser: Move high-volume debug output to higher debug level
Add another level for debug.
Signed-off-by: Eli Dorfman <elid@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.h | 7 | ||||
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_memory.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h index 1ee867b1b341..a8c1b300e34d 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.h +++ b/drivers/infiniband/ulp/iser/iscsi_iser.h | |||
@@ -71,6 +71,13 @@ | |||
71 | 71 | ||
72 | #define iser_dbg(fmt, arg...) \ | 72 | #define iser_dbg(fmt, arg...) \ |
73 | do { \ | 73 | do { \ |
74 | if (iser_debug_level > 1) \ | ||
75 | printk(KERN_DEBUG PFX "%s:" fmt,\ | ||
76 | __func__ , ## arg); \ | ||
77 | } while (0) | ||
78 | |||
79 | #define iser_warn(fmt, arg...) \ | ||
80 | do { \ | ||
74 | if (iser_debug_level > 0) \ | 81 | if (iser_debug_level > 0) \ |
75 | printk(KERN_DEBUG PFX "%s:" fmt,\ | 82 | printk(KERN_DEBUG PFX "%s:" fmt,\ |
76 | __func__ , ## arg); \ | 83 | __func__ , ## arg); \ |
diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c index 4a17743a639f..ee58199136a8 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c | |||
@@ -334,8 +334,11 @@ static void iser_data_buf_dump(struct iser_data_buf *data, | |||
334 | struct scatterlist *sg; | 334 | struct scatterlist *sg; |
335 | int i; | 335 | int i; |
336 | 336 | ||
337 | if (iser_debug_level == 0) | ||
338 | return; | ||
339 | |||
337 | for_each_sg(sgl, sg, data->dma_nents, i) | 340 | for_each_sg(sgl, sg, data->dma_nents, i) |
338 | iser_err("sg[%d] dma_addr:0x%lX page:0x%p " | 341 | iser_warn("sg[%d] dma_addr:0x%lX page:0x%p " |
339 | "off:0x%x sz:0x%x dma_len:0x%x\n", | 342 | "off:0x%x sz:0x%x dma_len:0x%x\n", |
340 | i, (unsigned long)ib_sg_dma_address(ibdev, sg), | 343 | i, (unsigned long)ib_sg_dma_address(ibdev, sg), |
341 | sg_page(sg), sg->offset, | 344 | sg_page(sg), sg->offset, |
@@ -434,7 +437,7 @@ int iser_reg_rdma_mem(struct iscsi_iser_cmd_task *iser_ctask, | |||
434 | 437 | ||
435 | aligned_len = iser_data_buf_aligned_len(mem, ibdev); | 438 | aligned_len = iser_data_buf_aligned_len(mem, ibdev); |
436 | if (aligned_len != mem->dma_nents) { | 439 | if (aligned_len != mem->dma_nents) { |
437 | iser_err("rdma alignment violation %d/%d aligned\n", | 440 | iser_warn("rdma alignment violation %d/%d aligned\n", |
438 | aligned_len, mem->size); | 441 | aligned_len, mem->size); |
439 | iser_data_buf_dump(mem, ibdev); | 442 | iser_data_buf_dump(mem, ibdev); |
440 | 443 | ||