diff options
author | James Smart <James.Smart@Emulex.Com> | 2006-03-07 21:04:01 +0100 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-12 15:56:13 +0100 |
commit | fdcebe282fd8654381852260efec267eff8002fb (patch) | |
tree | 6cde5a6376cfc4880be192a41a5b84407fad0d38 /drivers/scsi/lpfc/lpfc_els.c | |
parent | [SCSI] lpfc 8.1.4 : Fix Discovery processing for NPorts that change their NPo... (diff) | |
download | linux-fdcebe282fd8654381852260efec267eff8002fb.tar.xz linux-fdcebe282fd8654381852260efec267eff8002fb.zip |
[SCSI] lpfc 8.1.4 : Fixed RSCN handling when a PLOGI is in retry
Fixed RSCN handling when a PLOGI is in retry.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 51 |
1 files changed, 42 insertions, 9 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index efba875e53e4..6d12cd0c49ff 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -1435,6 +1435,46 @@ lpfc_issue_els_farpr(struct lpfc_hba * phba, uint32_t nportid, uint8_t retry) } void +lpfc_cancel_retry_delay_tmo(struct lpfc_hba *phba, struct lpfc_nodelist * nlp) +{ + nlp->nlp_flag &= ~NLP_DELAY_TMO; + del_timer_sync(&nlp->nlp_delayfunc); + nlp->nlp_last_elscmd = 0; + + if (!list_empty(&nlp->els_retry_evt.evt_listp)) + list_del_init(&nlp->els_retry_evt.evt_listp); + + if (nlp->nlp_flag & NLP_NPR_2B_DISC) { + nlp->nlp_flag &= ~NLP_NPR_2B_DISC; + if (phba->num_disc_nodes) { + /* Check to see if there are more + * PLOGIs to be sent + */ + lpfc_more_plogi(phba); + } + + if (phba->num_disc_nodes == 0) { + phba->fc_flag &= ~FC_NDISC_ACTIVE; + lpfc_can_disctmo(phba); + if (phba->fc_flag & FC_RSCN_MODE) { + /* Check to see if more RSCNs + * came in while we were + * processing this one. + */ + if((phba->fc_rscn_id_cnt==0) && + (!(phba->fc_flag & FC_RSCN_DISCOVERY))) { + phba->fc_flag &= ~FC_RSCN_MODE; + } + else { + lpfc_els_handle_rscn(phba); + } + } + } + } + return; +} + +void lpfc_els_retry_delay(unsigned long ptr) { struct lpfc_nodelist *ndlp; @@ -2415,15 +2455,8 @@ lpfc_rscn_recovery_check(struct lpfc_hba * phba) /* Make sure NLP_DELAY_TMO is NOT running * after a device recovery event. */ - if (ndlp->nlp_flag & NLP_DELAY_TMO) { - ndlp->nlp_flag &= ~NLP_DELAY_TMO; - ndlp->nlp_last_elscmd = 0; - del_timer_sync(&ndlp->nlp_delayfunc); - if (!list_empty(&ndlp-> - els_retry_evt.evt_listp)) - list_del_init(&ndlp-> - els_retry_evt.evt_listp); - } + if (ndlp->nlp_flag & NLP_DELAY_TMO) + lpfc_cancel_retry_delay_tmo(phba, ndlp); } } return 0; |