[SCSI] qla2xxx: Do not take a second firmware dump when intentionally generating...
authorChad Dupuis <chad.dupuis@qlogic.com>
Tue, 25 Jun 2013 15:27:20 +0000 (11:27 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 8 Jul 2013 16:21:51 +0000 (17:21 +0100)
When we are intentionally generating a firmware dump by executing the
MBC_GEN_SYSTEM_ERROR command, the command actually times out. The normal
course of action when a mailbox command times out is to take a firmware dump.
However, in this special case we do not want to do this since the
MBA_SYSTEM_ERR AEN already generates a firmware dump.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla2xxx/qla_mbx.c

index 144effd45ddfd6e59f01f1ab25f1fcffe5fd8835..7257c3c4f2d0819dd59601aa95d0c6ac8e5dbfe1 100644 (file)
@@ -281,9 +281,11 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
 
                /*
                 * Attempt to capture a firmware dump for further analysis
-                * of the current firmware state
+                * of the current firmware state.  We do not need to do this
+                * if we are intentionally generating a dump.
                 */
-               ha->isp_ops->fw_dump(vha, 0);
+               if (mcp->mb[0] != MBC_GEN_SYSTEM_ERROR)
+                       ha->isp_ops->fw_dump(vha, 0);
 
                rval = QLA_FUNCTION_TIMEOUT;
        }