Commit a7ddd02b authored by Joe Carnuccio's avatar Joe Carnuccio Committed by Martin K. Petersen

qla2xxx: Make debug buffer log easier to view.

Signed-off-by: default avatarJoe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: default avatarHimanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a2b3e01d
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* ---------------------------------------------------------------------- * ----------------------------------------------------------------------
* | Module Init and Probe | 0x018f | 0x0146 | * | Module Init and Probe | 0x018f | 0x0146 |
* | | | 0x015b-0x0160 | * | | | 0x015b-0x0160 |
* | | | 0x016e-0x0170 | * | | | 0x016e |
* | Mailbox commands | 0x1192 | | * | Mailbox commands | 0x1192 | |
* | | | | * | | | |
* | Device Discovery | 0x2003 | 0x2016 | * | Device Discovery | 0x2003 | 0x2016 |
...@@ -2698,29 +2698,24 @@ ql_dump_regs(uint32_t level, scsi_qla_host_t *vha, int32_t id) ...@@ -2698,29 +2698,24 @@ ql_dump_regs(uint32_t level, scsi_qla_host_t *vha, int32_t id)
void void
ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id, ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id,
uint8_t *b, uint32_t size) uint8_t *buf, uint size)
{ {
uint32_t cnt; uint cnt;
uint8_t c;
if (!ql_mask_match(level)) if (!ql_mask_match(level))
return; return;
ql_dbg(level, vha, id, " 0 1 2 3 4 5 6 7 8 " ql_dbg(level, vha, id,
"9 Ah Bh Ch Dh Eh Fh\n"); "%-+5d 0 1 2 3 4 5 6 7 8 9 A B C D E F\n", size);
ql_dbg(level, vha, id, "----------------------------------" ql_dbg(level, vha, id,
"----------------------------\n"); "----- -----------------------------------------------\n");
for (cnt = 0; cnt < size; cnt++, buf++) {
ql_dbg(level, vha, id, " "); if (cnt % 16 == 0)
for (cnt = 0; cnt < size;) { ql_dbg(level, vha, id, "%04x:", cnt & ~0xFU);
c = *b++; printk(" %02x", *buf);
printk("%02x", (uint32_t) c); if (cnt % 16 == 15)
cnt++;
if (!(cnt % 16))
printk("\n"); printk("\n");
else
printk(" ");
} }
if (cnt % 16) if (cnt % 16 != 0)
ql_dbg(level, vha, id, "\n"); printk("\n");
} }
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