[SCSI] qla2xxx: Clear options-flags while issuing stop-firmware mbx command.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Thu, 9 Feb 2012 19:14:06 +0000 (11:14 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 18 Feb 2012 14:44:51 +0000 (08:44 -0600)
Not clearing the options flags in mbx1 could lead the firmware
into interpreting old data in mbx1 through mbx8.  This could
lead to inadvertent DMA read/write operations to stale memory.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla2xxx/qla_mbx.c

index 34344d3f865832ce963f1091105c4efc753074bf..8635722332a0c9fa08c20ffdf6463257398ef786 100644 (file)
@@ -2581,7 +2581,8 @@ qla2x00_stop_firmware(scsi_qla_host_t *vha)
        ql_dbg(ql_dbg_mbx, vha, 0x10a1, "Entered %s.\n", __func__);
 
        mcp->mb[0] = MBC_STOP_FIRMWARE;
-       mcp->out_mb = MBX_0;
+       mcp->mb[1] = 0;
+       mcp->out_mb = MBX_1|MBX_0;
        mcp->in_mb = MBX_0;
        mcp->tov = 5;
        mcp->flags = 0;