diff options
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 1b2305333ed8..745ba85a8993 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -741,14 +741,15 @@ lpfc_selective_reset(struct lpfc_hba *phba) | |||
741 | int status = 0; | 741 | int status = 0; |
742 | int rc; | 742 | int rc; |
743 | 743 | ||
744 | if ((!phba->cfg_enable_hba_reset) || | 744 | if (!phba->cfg_enable_hba_reset) |
745 | (phba->pport->fc_flag & FC_OFFLINE_MODE)) | ||
746 | return -EACCES; | 745 | return -EACCES; |
747 | 746 | ||
748 | status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE); | 747 | if (!(phba->pport->fc_flag & FC_OFFLINE_MODE)) { |
748 | status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE); | ||
749 | 749 | ||
750 | if (status != 0) | 750 | if (status != 0) |
751 | return status; | 751 | return status; |
752 | } | ||
752 | 753 | ||
753 | init_completion(&online_compl); | 754 | init_completion(&online_compl); |
754 | rc = lpfc_workq_post_event(phba, &status, &online_compl, | 755 | rc = lpfc_workq_post_event(phba, &status, &online_compl, |