From: Andrew Vasquez Date: Thu, 20 Oct 2011 17:14:16 +0000 (-0700) Subject: qla2xxx: Clear options-flags while issuing stop-firmware mbx command. X-Git-Tag: v2.6.39-400.9.0~423^2~97 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c8d163445583c55f1666ccbd451115217da5e990;p=users%2Fjedix%2Flinux-maple.git qla2xxx: Clear options-flags while issuing stop-firmware mbx command. 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. JIRA Key: V2632FC-92 --- diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 25cf9ffe0dfa..8899218de418 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -2598,7 +2598,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;