[SCSI] lpfc 8.3.41: Fixed not able to perform PCI function reset when board was not...
authorJames Smart <james.smart@emulex.com>
Mon, 15 Jul 2013 22:34:36 +0000 (18:34 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 23 Aug 2013 17:22:23 +0000 (13:22 -0400)
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/lpfc/lpfc_attr.c

index 1b2305333ed8f494103c56c7634558a970b554a3..745ba85a899350afb7a4483b23b1485b0dfff8ec 100644 (file)
@@ -741,14 +741,15 @@ lpfc_selective_reset(struct lpfc_hba *phba)
        int status = 0;
        int rc;
 
-       if ((!phba->cfg_enable_hba_reset) ||
-           (phba->pport->fc_flag & FC_OFFLINE_MODE))
+       if (!phba->cfg_enable_hba_reset)
                return -EACCES;
 
-       status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE);
+       if (!(phba->pport->fc_flag & FC_OFFLINE_MODE)) {
+               status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE);
 
-       if (status != 0)
-               return status;
+               if (status != 0)
+                       return status;
+       }
 
        init_completion(&online_compl);
        rc = lpfc_workq_post_event(phba, &status, &online_compl,