]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] qla2xxx: Always serialize mailbox command execution.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Thu, 22 Jan 2009 17:45:31 +0000 (09:45 -0800)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sun, 25 Jan 2009 13:56:52 +0000 (07:56 -0600)
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: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/qla2xxx/qla_mbx.c

index db4df45234a562397f39a3b6944c333acf1f36a8..f94ffbb98e95f2a53918888ed76ebf235b3aa5cc 100644 (file)
@@ -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
         * non ISP abort time.
         */
-       if (!abort_active) {
-               if (!wait_for_completion_timeout(&ha->mbx_cmd_comp,
-                   mcp->tov * HZ)) {
-                       /* Timeout occurred. Return error. */
-                       DEBUG2_3_11(printk("%s(%ld): cmd access timeout. "
-                           "Exiting.\n", __func__, base_vha->host_no));
-                       return QLA_FUNCTION_TIMEOUT;
-               }
+       if (!wait_for_completion_timeout(&ha->mbx_cmd_comp, mcp->tov * HZ)) {
+               /* Timeout occurred. Return error. */
+               DEBUG2_3_11(printk("%s(%ld): cmd access timeout. "
+                   "Exiting.\n", __func__, base_vha->host_no));
+               return QLA_FUNCTION_TIMEOUT;
        }
 
        ha->flags.mbox_busy = 1;
@@ -265,8 +262,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
        }
 
        /* Allow next mbx cmd to come in. */
-       if (!abort_active)
-               complete(&ha->mbx_cmd_comp);
+       complete(&ha->mbx_cmd_comp);
 
        if (rval) {
                DEBUG2_3_11(printk("%s(%ld): **** FAILED. mbx0=%x, mbx1=%x, "