]> err.no Git - linux-2.6/commitdiff
IB/iser: Move high-volume debug output to higher debug level
authorEli Dorfman <dorfman.eli@gmail.com>
Tue, 29 Apr 2008 20:46:52 +0000 (13:46 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 29 Apr 2008 20:46:52 +0000 (13:46 -0700)
Add another level for debug.

Signed-off-by: Eli Dorfman <elid@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/iser/iscsi_iser.h
drivers/infiniband/ulp/iser/iser_memory.c

index 1ee867b1b3411754c58a814331283944b45b9587..a8c1b300e34d54d76eb18eeb646db24b2c34b598 100644 (file)
 #define DRV_DATE       "May 7th, 2006"
 
 #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 {                                            \
                if (iser_debug_level > 0)               \
                        printk(KERN_DEBUG PFX "%s:" fmt,\
index 4a17743a639f2ae884f4cbe122e8e68f1a6f12b9..ee58199136a85bf1b11bef1a16ba34a1e3daece5 100644 (file)
@@ -334,8 +334,11 @@ static void iser_data_buf_dump(struct iser_data_buf *data,
        struct scatterlist *sg;
        int i;
 
+       if (iser_debug_level == 0)
+               return;
+
        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",
                         i, (unsigned long)ib_sg_dma_address(ibdev, sg),
                         sg_page(sg), sg->offset,
@@ -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);
        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);
                iser_data_buf_dump(mem, ibdev);