aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJoe Carnuccio <joe.carnuccio@qlogic.com>2016-07-06 11:14:22 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2016-07-15 15:31:31 -0400
commita7ddd02b108ecada1cf5a5ccb9362179d5671db4 (patch)
treee28ddeb4a43bea94f10db8e9e611768b43d08570 /drivers/scsi
parenta2b3e01da730a87023c66d1c104c43848dbba847 (diff)
qla2xxx: Make debug buffer log easier to view.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 907a7acb1639..589cd13b5a0d 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -13,7 +13,7 @@
13 * ---------------------------------------------------------------------- 13 * ----------------------------------------------------------------------
14 * | Module Init and Probe | 0x018f | 0x0146 | 14 * | Module Init and Probe | 0x018f | 0x0146 |
15 * | | | 0x015b-0x0160 | 15 * | | | 0x015b-0x0160 |
16 * | | | 0x016e-0x0170 | 16 * | | | 0x016e |
17 * | Mailbox commands | 0x1192 | | 17 * | Mailbox commands | 0x1192 | |
18 * | | | | 18 * | | | |
19 * | Device Discovery | 0x2003 | 0x2016 | 19 * | Device Discovery | 0x2003 | 0x2016 |
@@ -2698,29 +2698,24 @@ ql_dump_regs(uint32_t level, scsi_qla_host_t *vha, int32_t id)
2698 2698
2699void 2699void
2700ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id, 2700ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id,
2701 uint8_t *b, uint32_t size) 2701 uint8_t *buf, uint size)
2702{ 2702{
2703 uint32_t cnt; 2703 uint cnt;
2704 uint8_t c;
2705 2704
2706 if (!ql_mask_match(level)) 2705 if (!ql_mask_match(level))
2707 return; 2706 return;
2708 2707
2709 ql_dbg(level, vha, id, " 0 1 2 3 4 5 6 7 8 " 2708 ql_dbg(level, vha, id,
2710 "9 Ah Bh Ch Dh Eh Fh\n"); 2709 "%-+5d 0 1 2 3 4 5 6 7 8 9 A B C D E F\n", size);
2711 ql_dbg(level, vha, id, "----------------------------------" 2710 ql_dbg(level, vha, id,
2712 "----------------------------\n"); 2711 "----- -----------------------------------------------\n");
2713 2712 for (cnt = 0; cnt < size; cnt++, buf++) {
2714 ql_dbg(level, vha, id, " "); 2713 if (cnt % 16 == 0)
2715 for (cnt = 0; cnt < size;) { 2714 ql_dbg(level, vha, id, "%04x:", cnt & ~0xFU);
2716 c = *b++; 2715 printk(" %02x", *buf);
2717 printk("%02x", (uint32_t) c); 2716 if (cnt % 16 == 15)
2718 cnt++;
2719 if (!(cnt % 16))
2720 printk("\n"); 2717 printk("\n");
2721 else
2722 printk(" ");
2723 } 2718 }
2724 if (cnt % 16) 2719 if (cnt % 16 != 0)
2725 ql_dbg(level, vha, id, "\n"); 2720 printk("\n");
2726} 2721}