diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2013-07-28 05:35:36 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-08-09 20:18:08 -0400 |
commit | f91424cf5b0f22a33dea4ccfb0780ee45517b3c8 (patch) | |
tree | 1e0b87875ad47dba8ea16802ddcbbd4822a35f88 /drivers/infiniband | |
parent | c095ba7224d8edc71dcef0d655911399a8bd4a3f (diff) |
IB/iser: Use proper debug level value for info prints
Commit 4f363882612 ("IB/iser: Move informational messages from error
to info level") set info prints to be emitted at a lower debug level
than warning prints, which is a bit odd. Fix that.
Also move the prints on unaligned SG from warning to debug level.
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.h | 4 | ||||
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_memory.c | 13 |
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h index 4f069c0d4c04..d694bcd479fe 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.h +++ b/drivers/infiniband/ulp/iser/iscsi_iser.h | |||
@@ -78,14 +78,14 @@ | |||
78 | 78 | ||
79 | #define iser_warn(fmt, arg...) \ | 79 | #define iser_warn(fmt, arg...) \ |
80 | do { \ | 80 | do { \ |
81 | if (iser_debug_level > 1) \ | 81 | if (iser_debug_level > 0) \ |
82 | pr_warn(PFX "%s:" fmt, \ | 82 | pr_warn(PFX "%s:" fmt, \ |
83 | __func__ , ## arg); \ | 83 | __func__ , ## arg); \ |
84 | } while (0) | 84 | } while (0) |
85 | 85 | ||
86 | #define iser_info(fmt, arg...) \ | 86 | #define iser_info(fmt, arg...) \ |
87 | do { \ | 87 | do { \ |
88 | if (iser_debug_level > 0) \ | 88 | if (iser_debug_level > 1) \ |
89 | pr_info(PFX "%s:" fmt, \ | 89 | pr_info(PFX "%s:" fmt, \ |
90 | __func__ , ## arg); \ | 90 | __func__ , ## arg); \ |
91 | } while (0) | 91 | } while (0) |
diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser/iser_memory.c index 7827baf455a1..797e49ff7f8e 100644 --- a/drivers/infiniband/ulp/iser/iser_memory.c +++ b/drivers/infiniband/ulp/iser/iser_memory.c | |||
@@ -267,11 +267,8 @@ static void iser_data_buf_dump(struct iser_data_buf *data, | |||
267 | struct scatterlist *sg; | 267 | struct scatterlist *sg; |
268 | int i; | 268 | int i; |
269 | 269 | ||
270 | if (iser_debug_level == 0) | ||
271 | return; | ||
272 | |||
273 | for_each_sg(sgl, sg, data->dma_nents, i) | 270 | for_each_sg(sgl, sg, data->dma_nents, i) |
274 | iser_warn("sg[%d] dma_addr:0x%lX page:0x%p " | 271 | iser_dbg("sg[%d] dma_addr:0x%lX page:0x%p " |
275 | "off:0x%x sz:0x%x dma_len:0x%x\n", | 272 | "off:0x%x sz:0x%x dma_len:0x%x\n", |
276 | i, (unsigned long)ib_sg_dma_address(ibdev, sg), | 273 | i, (unsigned long)ib_sg_dma_address(ibdev, sg), |
277 | sg_page(sg), sg->offset, | 274 | sg_page(sg), sg->offset, |
@@ -373,9 +370,11 @@ int iser_reg_rdma_mem(struct iscsi_iser_task *iser_task, | |||
373 | if (aligned_len != mem->dma_nents || | 370 | if (aligned_len != mem->dma_nents || |
374 | (!ib_conn->fmr_pool && mem->dma_nents > 1)) { | 371 | (!ib_conn->fmr_pool && mem->dma_nents > 1)) { |
375 | iscsi_conn->fmr_unalign_cnt++; | 372 | iscsi_conn->fmr_unalign_cnt++; |
376 | iser_warn("rdma alignment violation (%d/%d aligned) or FMR not supported\n", | 373 | iser_dbg("rdma alignment violation (%d/%d aligned) or FMR not supported\n", |
377 | aligned_len, mem->size); | 374 | aligned_len, mem->size); |
378 | iser_data_buf_dump(mem, ibdev); | 375 | |
376 | if (iser_debug_level > 0) | ||
377 | iser_data_buf_dump(mem, ibdev); | ||
379 | 378 | ||
380 | /* unmap the command data before accessing it */ | 379 | /* unmap the command data before accessing it */ |
381 | iser_dma_unmap_task_data(iser_task); | 380 | iser_dma_unmap_task_data(iser_task); |