]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qla2xxx: Complete mailbox command timedout to avoid initialization failures during...
authorGiridhar Malavali <giridhar.malavali@qlogic.com>
Wed, 14 Dec 2011 01:17:47 +0000 (17:17 -0800)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Wed, 9 May 2012 00:40:58 +0000 (17:40 -0700)
Complete the mailbox command timed out before initiating another abort cycle
to recover so that mailbox commands issued during next reset cycle don't fail
due to pending mailbox access timeout.

JIRA Key: V2632FC-122

drivers/scsi/qla2xxx/qla_mbx.c

index db10cd02e2a392cf10075494dcddebbbddabe454..7fdd3c1e99104b1db57c151cce9675f3ac625e92 100644 (file)
@@ -348,6 +348,8 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
                                    command, mcp->mb[0]);
                                set_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags);
                                clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
+                               /* Allow next mbx cmd to come in. */
+                               complete(&ha->mbx_cmd_comp);
                                if (ha->isp_ops->abort_isp(vha)) {
                                        /* Failed. retry later. */
                                        set_bit(ISP_ABORT_NEEDED,
@@ -356,6 +358,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
                                clear_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags);
                                ql_dbg(ql_dbg_mbx, vha, 0x101f,
                                    "Finished abort_isp.\n");
+                               goto mbx_done;
                        }
                }
        }
@@ -364,6 +367,7 @@ premature_exit:
        /* Allow next mbx cmd to come in. */
        complete(&ha->mbx_cmd_comp);
 
+mbx_done:
        if (rval) {
                ql_dbg(ql_dbg_mbx, base_vha, 0x1020,
                    "**** Failed mbx[0]=%x, mb[1]=%x, mb[2]=%x, mb[3]=%x, cmd=%x ****.\n",