qla2xxx: Prevent multiple firmware dump collection for ISP27XX.
authorHimanshu Madhani <himanshu.madhani@qlogic.com>
Thu, 9 Apr 2015 19:00:05 +0000 (15:00 -0400)
committerJames Bottomley <JBottomley@Odin.com>
Fri, 10 Apr 2015 15:42:49 +0000 (08:42 -0700)
For ISP27XX, driver will capture new firmware dump even if there is
one already collected. Prevent this from happening by checking
fw_dumped flag.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/qla2xxx/qla_dbg.c
drivers/scsi/qla2xxx/qla_tmpl.c

index b06b6b5a11c5b8929b12f12bcd6df05c8fa5be73..0e6ee3ca30e667591db375ba73d9009b286ec93b 100644 (file)
@@ -60,7 +60,7 @@
  * |                              |                    | 0xb13c-0xb140  |
  * |                              |                    | 0xb149                |
  * | MultiQ                       |       0xc00c       |               |
- * | Misc                         |       0xd213       | 0xd016-0xd017 |
+ * | Misc                         |       0xd300       | 0xd016-0xd017 |
  * |                              |                    | 0xd021,0xd024 |
  * |                              |                    | 0xd025,0xd029 |
  * |                              |                    | 0xd02a,0xd02e |
index d52cdb863243c07db4d1b340e73195647cc18b1c..962cb89fe0ae9abe38562766f3b03de7766d506a 100644 (file)
@@ -947,6 +947,10 @@ qla27xx_fwdump(scsi_qla_host_t *vha, int hardware_locked)
                ql_log(ql_log_warn, vha, 0xd01e, "fwdump buffer missing.\n");
        else if (!vha->hw->fw_dump_template)
                ql_log(ql_log_warn, vha, 0xd01f, "fwdump template missing.\n");
+       else if (vha->hw->fw_dumped)
+               ql_log(ql_log_warn, vha, 0xd300,
+                   "Firmware has been previously dumped (%p),"
+                   " -- ignoring request\n", vha->hw->fw_dump);
        else
                qla27xx_execute_fwdt_template(vha);