aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_dbg.c
diff options
context:
space:
mode:
authorSaurav Kashyap <saurav.kashyap@qlogic.com>2011-07-14 15:00:13 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-07-27 06:16:17 -0400
commit7c3df1320e5e875478775e78d01a09aee96b8abe (patch)
tree215326b999b3db03f4a2268a79c3848803daaf7d /drivers/scsi/qla2xxx/qla_dbg.c
parent3ce8866ceae87258cf66d1f7fd72abc918753cec (diff)
[SCSI] qla2xxx: Code changes to support new dynamic logging infrastructure.
The code is changed to support the new dynamic logging infrastructure. Following are the levels added. Default is 0 - no logging. 0x40000000 - Module Init & Probe. 0x20000000 - Mailbox Cmnds. 0x10000000 - Device Discovery. 0x08000000 - IO tracing. 0x04000000 - DPC Thread. 0x02000000 - Async events. 0x01000000 - Timer routines. 0x00800000 - User space. 0x00400000 - Task Management. 0x00200000 - AER/EEH. 0x00100000 - Multi Q. 0x00080000 - P3P Specific. 0x00040000 - Virtual Port. 0x00020000 - Buffer Dump. 0x00010000 - Misc. 0x7fffffff - For enabling all logs, can be too many logs. Setting ql2xextended_error_logging module parameter to any of the above value, will enable the debug for that particular level. Do LOGICAL OR of the value to enable more than one level. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_dbg.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.c79
1 files changed, 42 insertions, 37 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index dba9eedc3ded..5c1e69f091e5 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -11,18 +11,18 @@
11 * ----------------------------------------------------- 11 * -----------------------------------------------------
12 * | Level | Last Value Used | 12 * | Level | Last Value Used |
13 * ----------------------------------------------------- 13 * -----------------------------------------------------
14 * | Module Init and Probe | 0x0109 | 14 * | Module Init and Probe | 0x0116 |
15 * | Mailbox commands | 0x1120 | 15 * | Mailbox commands | 0x111e |
16 * | Device Discovery | 0x207d | 16 * | Device Discovery | 0x2083 |
17 * | Queue Command and IO tracing | 0x304f | 17 * | Queue Command and IO tracing | 0x302e |
18 * | DPC Thread | 0x401c | 18 * | DPC Thread | 0x401c |
19 * | Async Events | 0x5058 | 19 * | Async Events | 0x5059 |
20 * | Timer Routines | 0x600d | 20 * | Timer Routines | 0x600d |
21 * | User Space Interactions | 0x70a1 | 21 * | User Space Interactions | 0x709c |
22 * | Task Management | 0x8032 | 22 * | Task Management | 0x8043 |
23 * | AER/EEH | 0x9010 | 23 * | AER/EEH | 0x900f |
24 * | Virtual Port | 0xa007 | 24 * | Virtual Port | 0xa007 |
25 * | ISP82XX Specific | 0xb028 | 25 * | ISP82XX Specific | 0xb027 |
26 * | MultiQ | 0xc00b | 26 * | MultiQ | 0xc00b |
27 * | Misc | 0xd00b | 27 * | Misc | 0xd00b |
28 * ----------------------------------------------------- 28 * -----------------------------------------------------
@@ -409,11 +409,11 @@ qla2xxx_dump_post_process(scsi_qla_host_t *vha, int rval)
409 struct qla_hw_data *ha = vha->hw; 409 struct qla_hw_data *ha = vha->hw;
410 410
411 if (rval != QLA_SUCCESS) { 411 if (rval != QLA_SUCCESS) {
412 qla_printk(KERN_WARNING, ha, 412 ql_log(ql_log_warn, vha, 0xd000,
413 "Failed to dump firmware (%x)!!!\n", rval); 413 "Failed to dump firmware (%x).\n", rval);
414 ha->fw_dumped = 0; 414 ha->fw_dumped = 0;
415 } else { 415 } else {
416 qla_printk(KERN_INFO, ha, 416 ql_log(ql_log_info, vha, 0xd001,
417 "Firmware dump saved to temp buffer (%ld/%p).\n", 417 "Firmware dump saved to temp buffer (%ld/%p).\n",
418 vha->host_no, ha->fw_dump); 418 vha->host_no, ha->fw_dump);
419 ha->fw_dumped = 1; 419 ha->fw_dumped = 1;
@@ -445,15 +445,16 @@ qla2300_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
445 spin_lock_irqsave(&ha->hardware_lock, flags); 445 spin_lock_irqsave(&ha->hardware_lock, flags);
446 446
447 if (!ha->fw_dump) { 447 if (!ha->fw_dump) {
448 qla_printk(KERN_WARNING, ha, 448 ql_log(ql_log_warn, vha, 0xd002,
449 "No buffer available for dump!!!\n"); 449 "No buffer available for dump.\n");
450 goto qla2300_fw_dump_failed; 450 goto qla2300_fw_dump_failed;
451 } 451 }
452 452
453 if (ha->fw_dumped) { 453 if (ha->fw_dumped) {
454 qla_printk(KERN_WARNING, ha, 454 ql_log(ql_log_warn, vha, 0xd003,
455 "Firmware has been previously dumped (%p) -- ignoring " 455 "Firmware has been previously dumped (%p) "
456 "request...\n", ha->fw_dump); 456 "-- ignoring request.\n",
457 ha->fw_dump);
457 goto qla2300_fw_dump_failed; 458 goto qla2300_fw_dump_failed;
458 } 459 }
459 fw = &ha->fw_dump->isp.isp23; 460 fw = &ha->fw_dump->isp.isp23;
@@ -608,15 +609,16 @@ qla2100_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
608 spin_lock_irqsave(&ha->hardware_lock, flags); 609 spin_lock_irqsave(&ha->hardware_lock, flags);
609 610
610 if (!ha->fw_dump) { 611 if (!ha->fw_dump) {
611 qla_printk(KERN_WARNING, ha, 612 ql_log(ql_log_warn, vha, 0xd004,
612 "No buffer available for dump!!!\n"); 613 "No buffer available for dump.\n");
613 goto qla2100_fw_dump_failed; 614 goto qla2100_fw_dump_failed;
614 } 615 }
615 616
616 if (ha->fw_dumped) { 617 if (ha->fw_dumped) {
617 qla_printk(KERN_WARNING, ha, 618 ql_log(ql_log_warn, vha, 0xd005,
618 "Firmware has been previously dumped (%p) -- ignoring " 619 "Firmware has been previously dumped (%p) "
619 "request...\n", ha->fw_dump); 620 "-- ignoring request.\n",
621 ha->fw_dump);
620 goto qla2100_fw_dump_failed; 622 goto qla2100_fw_dump_failed;
621 } 623 }
622 fw = &ha->fw_dump->isp.isp21; 624 fw = &ha->fw_dump->isp.isp21;
@@ -805,15 +807,16 @@ qla24xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
805 spin_lock_irqsave(&ha->hardware_lock, flags); 807 spin_lock_irqsave(&ha->hardware_lock, flags);
806 808
807 if (!ha->fw_dump) { 809 if (!ha->fw_dump) {
808 qla_printk(KERN_WARNING, ha, 810 ql_log(ql_log_warn, vha, 0xd006,
809 "No buffer available for dump!!!\n"); 811 "No buffer available for dump.\n");
810 goto qla24xx_fw_dump_failed; 812 goto qla24xx_fw_dump_failed;
811 } 813 }
812 814
813 if (ha->fw_dumped) { 815 if (ha->fw_dumped) {
814 qla_printk(KERN_WARNING, ha, 816 ql_log(ql_log_warn, vha, 0xd007,
815 "Firmware has been previously dumped (%p) -- ignoring " 817 "Firmware has been previously dumped (%p) "
816 "request...\n", ha->fw_dump); 818 "-- ignoring request.\n",
819 ha->fw_dump);
817 goto qla24xx_fw_dump_failed; 820 goto qla24xx_fw_dump_failed;
818 } 821 }
819 fw = &ha->fw_dump->isp.isp24; 822 fw = &ha->fw_dump->isp.isp24;
@@ -1043,15 +1046,16 @@ qla25xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
1043 spin_lock_irqsave(&ha->hardware_lock, flags); 1046 spin_lock_irqsave(&ha->hardware_lock, flags);
1044 1047
1045 if (!ha->fw_dump) { 1048 if (!ha->fw_dump) {
1046 qla_printk(KERN_WARNING, ha, 1049 ql_log(ql_log_warn, vha, 0xd008,
1047 "No buffer available for dump!!!\n"); 1050 "No buffer available for dump.\n");
1048 goto qla25xx_fw_dump_failed; 1051 goto qla25xx_fw_dump_failed;
1049 } 1052 }
1050 1053
1051 if (ha->fw_dumped) { 1054 if (ha->fw_dumped) {
1052 qla_printk(KERN_WARNING, ha, 1055 ql_log(ql_log_warn, vha, 0xd009,
1053 "Firmware has been previously dumped (%p) -- ignoring " 1056 "Firmware has been previously dumped (%p) "
1054 "request...\n", ha->fw_dump); 1057 "-- ignoring request.\n",
1058 ha->fw_dump);
1055 goto qla25xx_fw_dump_failed; 1059 goto qla25xx_fw_dump_failed;
1056 } 1060 }
1057 fw = &ha->fw_dump->isp.isp25; 1061 fw = &ha->fw_dump->isp.isp25;
@@ -1354,15 +1358,16 @@ qla81xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
1354 spin_lock_irqsave(&ha->hardware_lock, flags); 1358 spin_lock_irqsave(&ha->hardware_lock, flags);
1355 1359
1356 if (!ha->fw_dump) { 1360 if (!ha->fw_dump) {
1357 qla_printk(KERN_WARNING, ha, 1361 ql_log(ql_log_warn, vha, 0xd00a,
1358 "No buffer available for dump!!!\n"); 1362 "No buffer available for dump.\n");
1359 goto qla81xx_fw_dump_failed; 1363 goto qla81xx_fw_dump_failed;
1360 } 1364 }
1361 1365
1362 if (ha->fw_dumped) { 1366 if (ha->fw_dumped) {
1363 qla_printk(KERN_WARNING, ha, 1367 ql_log(ql_log_warn, vha, 0xd00b,
1364 "Firmware has been previously dumped (%p) -- ignoring " 1368 "Firmware has been previously dumped (%p) "
1365 "request...\n", ha->fw_dump); 1369 "-- ignoring request.\n",
1370 ha->fw_dump);
1366 goto qla81xx_fw_dump_failed; 1371 goto qla81xx_fw_dump_failed;
1367 } 1372 }
1368 fw = &ha->fw_dump->isp.isp81; 1373 fw = &ha->fw_dump->isp.isp81;