Skip to contentSkip to conversation

lpfc 8.3.41: Fixed not able to perform PCI function reset when board was not in online mode

PATCH New James Smart 1 participant 1 message Jul 15, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 9/13 lpfc 8.3.41: Fixed not able to perform PCI function reset when board was not in online mode

Fixed not able to perform PCI function reset when board was not in online mode

---

 lpfc_attr.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/scsi/lpfc/lpfc_attr.c +6 -5
diff -upNr a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
@@ -741,14 +741,15 @@ lpfc_selective_reset(struct lpfc_hba *ph
 	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,