diff options
author | James Smart <james.smart@emulex.com> | 2013-04-17 20:16:51 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-05-02 12:56:30 -0700 |
commit | 229adb0ece8f06091252b06200c176e6cb5b4271 (patch) | |
tree | c71e006d8026e7de96468c2503ee9c707a00dc1d /drivers/scsi/lpfc/lpfc_attr.c | |
parent | a22e7db38b8a582701faaa608cc65bc2fb517cde (diff) | |
download | linux-229adb0ece8f06091252b06200c176e6cb5b4271.tar.gz linux-229adb0ece8f06091252b06200c176e6cb5b4271.tar.bz2 linux-229adb0ece8f06091252b06200c176e6cb5b4271.zip |
[SCSI] lpfc 8.3.39: Fix driver issues with SCSI Host reset
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 3b10aa5745b5..28e213b9dbba 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -674,6 +674,9 @@ lpfc_do_offline(struct lpfc_hba *phba, uint32_t type) int i; int rc; + if (phba->pport->fc_flag & FC_OFFLINE_MODE) + return 0; + init_completion(&online_compl); rc = lpfc_workq_post_event(phba, &status, &online_compl, LPFC_EVT_OFFLINE_PREP); @@ -741,7 +744,8 @@ lpfc_selective_reset(struct lpfc_hba *phba) int status = 0; int rc; - if (!phba->cfg_enable_hba_reset) + if ((!phba->cfg_enable_hba_reset) || + (phba->pport->fc_flag & FC_OFFLINE_MODE)) return -EACCES; status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE); @@ -895,6 +899,7 @@ lpfc_sli4_pdev_reg_request(struct lpfc_hba *phba, uint32_t opcode) pci_disable_sriov(pdev); phba->cfg_sriov_nr_virtfn = 0; } + status = lpfc_do_offline(phba, LPFC_EVT_OFFLINE); if (status != 0) |