]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi/lpfc: Fix successful aborts returning incorrect status
authorVaios Papadimitriou <vaios.papadimitriou@emulex.com>
Tue, 28 Aug 2012 22:52:36 +0000 (15:52 -0700)
committerJerry Snitselaar <jerry.snitselaar@oracle.com>
Wed, 5 Sep 2012 19:25:45 +0000 (12:25 -0700)
commit id: 3a70730aa06c37d46086ecdbca7107531fe2d2c5

Signed-off-by: Jerry Snitselaar <jerry.snitselaar@oracle.com>
drivers/scsi/lpfc/lpfc_scsi.c

index 391b8e1637eff01d3ebe50898a509baf14a8de4b..5b848889b349b1e9b9913e282c117c8c1b5a1a15 100644 (file)
@@ -4412,18 +4412,18 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
        struct lpfc_iocbq *abtsiocb;
        struct lpfc_scsi_buf *lpfc_cmd;
        IOCB_t *cmd, *icmd;
-       int ret = SUCCESS;
+       int ret = SUCCESS, status = 0;
        DECLARE_WAIT_QUEUE_HEAD_ONSTACK(waitq);
 
-       ret = fc_block_scsi_eh(cmnd);
-       if (ret)
-               return ret;
+       status = fc_block_scsi_eh(cmnd);
+       if (status)
+               return status;
        lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble;
        if (!lpfc_cmd) {
                lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP,
                         "2873 SCSI Layer I/O Abort Request IO CMPL Status "
                         "x%x ID %d LUN %d\n",
-                        ret, cmnd->device->id, cmnd->device->lun);
+                        SUCCESS, cmnd->device->id, cmnd->device->lun);
                return SUCCESS;
        }
 
@@ -4736,7 +4736,7 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd)
        unsigned tgt_id = cmnd->device->id;
        unsigned int lun_id = cmnd->device->lun;
        struct lpfc_scsi_event_header scsi_event;
-       int status = SUCCESS;
+       int status = 0, ret = SUCCESS;
 
        if (!rdata) {
                lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
@@ -4777,9 +4777,9 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd)
         * So, continue on.
         * We will report success if all the i/o aborts successfully.
         */
-       status = lpfc_reset_flush_io_context(vport, tgt_id, lun_id,
+       ret = lpfc_reset_flush_io_context(vport, tgt_id, lun_id,
                                                LPFC_CTX_LUN);
-       return status;
+       return ret;
 }
 
 /**
@@ -4803,7 +4803,7 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd)
        unsigned tgt_id = cmnd->device->id;
        unsigned int lun_id = cmnd->device->lun;
        struct lpfc_scsi_event_header scsi_event;
-       int status = SUCCESS;
+       int status = 0, ret = SUCCESS;
 
        if (!rdata) {
                lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
@@ -4844,9 +4844,9 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd)
         * So, continue on.
         * We will report success if all the i/o aborts successfully.
         */
-       status = lpfc_reset_flush_io_context(vport, tgt_id, lun_id,
-                                       LPFC_CTX_TGT);
-       return status;
+       ret = lpfc_reset_flush_io_context(vport, tgt_id, lun_id,
+                                         LPFC_CTX_TGT);
+       return ret;
 }
 
 /**