Commit 6ad42535 authored by Jamie Wellnitz's avatar Jamie Wellnitz Committed by James Bottomley

[SCSI] lpfc 8.1.2: Fixed a race condition in the PLOGI retry logic.

Fixed a race condition in the PLOGI retry logic.
Signed-off-by: default avatarJamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 7bb3b137
...@@ -1467,24 +1467,28 @@ lpfc_els_retry_delay_handler(struct lpfc_nodelist *ndlp) ...@@ -1467,24 +1467,28 @@ lpfc_els_retry_delay_handler(struct lpfc_nodelist *ndlp)
lpfc_issue_els_flogi(phba, ndlp, retry); lpfc_issue_els_flogi(phba, ndlp, retry);
break; break;
case ELS_CMD_PLOGI: case ELS_CMD_PLOGI:
ndlp->nlp_state = NLP_STE_PLOGI_ISSUE; if (!lpfc_issue_els_plogi(phba, ndlp, retry)) {
lpfc_nlp_list(phba, ndlp, NLP_PLOGI_LIST); ndlp->nlp_state = NLP_STE_PLOGI_ISSUE;
lpfc_issue_els_plogi(phba, ndlp, retry); lpfc_nlp_list(phba, ndlp, NLP_PLOGI_LIST);
}
break; break;
case ELS_CMD_ADISC: case ELS_CMD_ADISC:
ndlp->nlp_state = NLP_STE_ADISC_ISSUE; if (!lpfc_issue_els_adisc(phba, ndlp, retry)) {
lpfc_nlp_list(phba, ndlp, NLP_ADISC_LIST); ndlp->nlp_state = NLP_STE_ADISC_ISSUE;
lpfc_issue_els_adisc(phba, ndlp, retry); lpfc_nlp_list(phba, ndlp, NLP_ADISC_LIST);
}
break; break;
case ELS_CMD_PRLI: case ELS_CMD_PRLI:
ndlp->nlp_state = NLP_STE_PRLI_ISSUE; if (!lpfc_issue_els_prli(phba, ndlp, retry)) {
lpfc_nlp_list(phba, ndlp, NLP_PRLI_LIST); ndlp->nlp_state = NLP_STE_PRLI_ISSUE;
lpfc_issue_els_prli(phba, ndlp, retry); lpfc_nlp_list(phba, ndlp, NLP_PRLI_LIST);
}
break; break;
case ELS_CMD_LOGO: case ELS_CMD_LOGO:
ndlp->nlp_state = NLP_STE_NPR_NODE; if (!lpfc_issue_els_logo(phba, ndlp, retry)) {
lpfc_nlp_list(phba, ndlp, NLP_NPR_LIST); ndlp->nlp_state = NLP_STE_NPR_NODE;
lpfc_issue_els_logo(phba, ndlp, retry); lpfc_nlp_list(phba, ndlp, NLP_NPR_LIST);
}
break; break;
} }
return; return;
......
...@@ -1627,6 +1627,14 @@ lpfc_device_recov_npr_node(struct lpfc_hba * phba, ...@@ -1627,6 +1627,14 @@ lpfc_device_recov_npr_node(struct lpfc_hba * phba,
{ {
spin_lock_irq(phba->host->host_lock); spin_lock_irq(phba->host->host_lock);
ndlp->nlp_flag &= ~NLP_NPR_2B_DISC; ndlp->nlp_flag &= ~NLP_NPR_2B_DISC;
if (ndlp->nlp_flag & NLP_DELAY_TMO) {
ndlp->nlp_flag &= ~NLP_DELAY_TMO;
if (!list_empty(&ndlp->els_retry_evt.evt_listp))
list_del_init(&ndlp->els_retry_evt.evt_listp);
spin_unlock_irq(phba->host->host_lock);
del_timer_sync(&ndlp->nlp_delayfunc);
return (ndlp->nlp_state);
}
spin_unlock_irq(phba->host->host_lock); spin_unlock_irq(phba->host->host_lock);
return (ndlp->nlp_state); return (ndlp->nlp_state);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment