Commit 8eca3f39 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[SCSI] qla2xxx: Always serialize mailbox command execution.

Original code would incorrectly bypass serialization if the DPC
thread were performing a big-hammer operation (ISP abort).  This
short circuit, though rare, would subsequently stomp on a
secondary thread's mailbox command execution.  Found during
ISP81XX testing.
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 09ff36d3
...@@ -58,14 +58,11 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) ...@@ -58,14 +58,11 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
* seconds. This is to serialize actual issuing of mailbox cmds during * seconds. This is to serialize actual issuing of mailbox cmds during
* non ISP abort time. * non ISP abort time.
*/ */
if (!abort_active) { if (!wait_for_completion_timeout(&ha->mbx_cmd_comp, mcp->tov * HZ)) {
if (!wait_for_completion_timeout(&ha->mbx_cmd_comp, /* Timeout occurred. Return error. */
mcp->tov * HZ)) { DEBUG2_3_11(printk("%s(%ld): cmd access timeout. "
/* Timeout occurred. Return error. */ "Exiting.\n", __func__, base_vha->host_no));
DEBUG2_3_11(printk("%s(%ld): cmd access timeout. " return QLA_FUNCTION_TIMEOUT;
"Exiting.\n", __func__, base_vha->host_no));
return QLA_FUNCTION_TIMEOUT;
}
} }
ha->flags.mbox_busy = 1; ha->flags.mbox_busy = 1;
...@@ -265,8 +262,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) ...@@ -265,8 +262,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
} }
/* Allow next mbx cmd to come in. */ /* Allow next mbx cmd to come in. */
if (!abort_active) complete(&ha->mbx_cmd_comp);
complete(&ha->mbx_cmd_comp);
if (rval) { if (rval) {
DEBUG2_3_11(printk("%s(%ld): **** FAILED. mbx0=%x, mbx1=%x, " DEBUG2_3_11(printk("%s(%ld): **** FAILED. mbx0=%x, mbx1=%x, "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment