Commit 6f735e36 authored by Eli Dorfman's avatar Eli Dorfman Committed by Roland Dreier

IB/iser: Move high-volume debug output to higher debug level

Add another level for debug.
Signed-off-by: default avatarEli Dorfman <elid@voltaire.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 7df109d9
...@@ -70,6 +70,13 @@ ...@@ -70,6 +70,13 @@
#define DRV_DATE "May 7th, 2006" #define DRV_DATE "May 7th, 2006"
#define iser_dbg(fmt, arg...) \ #define iser_dbg(fmt, arg...) \
do { \
if (iser_debug_level > 1) \
printk(KERN_DEBUG PFX "%s:" fmt,\
__func__ , ## arg); \
} while (0)
#define iser_warn(fmt, arg...) \
do { \ do { \
if (iser_debug_level > 0) \ if (iser_debug_level > 0) \
printk(KERN_DEBUG PFX "%s:" fmt,\ printk(KERN_DEBUG PFX "%s:" fmt,\
......
...@@ -334,8 +334,11 @@ static void iser_data_buf_dump(struct iser_data_buf *data, ...@@ -334,8 +334,11 @@ static void iser_data_buf_dump(struct iser_data_buf *data,
struct scatterlist *sg; struct scatterlist *sg;
int i; int i;
if (iser_debug_level == 0)
return;
for_each_sg(sgl, sg, data->dma_nents, i) for_each_sg(sgl, sg, data->dma_nents, i)
iser_err("sg[%d] dma_addr:0x%lX page:0x%p " iser_warn("sg[%d] dma_addr:0x%lX page:0x%p "
"off:0x%x sz:0x%x dma_len:0x%x\n", "off:0x%x sz:0x%x dma_len:0x%x\n",
i, (unsigned long)ib_sg_dma_address(ibdev, sg), i, (unsigned long)ib_sg_dma_address(ibdev, sg),
sg_page(sg), sg->offset, sg_page(sg), sg->offset,
...@@ -434,7 +437,7 @@ int iser_reg_rdma_mem(struct iscsi_iser_cmd_task *iser_ctask, ...@@ -434,7 +437,7 @@ int iser_reg_rdma_mem(struct iscsi_iser_cmd_task *iser_ctask,
aligned_len = iser_data_buf_aligned_len(mem, ibdev); aligned_len = iser_data_buf_aligned_len(mem, ibdev);
if (aligned_len != mem->dma_nents) { if (aligned_len != mem->dma_nents) {
iser_err("rdma alignment violation %d/%d aligned\n", iser_warn("rdma alignment violation %d/%d aligned\n",
aligned_len, mem->size); aligned_len, mem->size);
iser_data_buf_dump(mem, ibdev); iser_data_buf_dump(mem, ibdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment