aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_els.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2006-03-07 15:04:01 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-12 09:56:13 -0500
commitfdcebe282fd8654381852260efec267eff8002fb (patch)
tree6cde5a6376cfc4880be192a41a5b84407fad0d38 /drivers/scsi/lpfc/lpfc_els.c
parent488d1469b318e6bf2b907743d626008340bc4f6e (diff)
[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.c51
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)
1435} 1435}
1436 1436
1437void 1437void
1438lpfc_cancel_retry_delay_tmo(struct lpfc_hba *phba, struct lpfc_nodelist * nlp)
1439{
1440 nlp->nlp_flag &= ~NLP_DELAY_TMO;
1441 del_timer_sync(&nlp->nlp_delayfunc);
1442 nlp->nlp_last_elscmd = 0;
1443
1444 if (!list_empty(&nlp->els_retry_evt.evt_listp))
1445 list_del_init(&nlp->els_retry_evt.evt_listp);
1446
1447 if (nlp->nlp_flag & NLP_NPR_2B_DISC) {
1448 nlp->nlp_flag &= ~NLP_NPR_2B_DISC;
1449 if (phba->num_disc_nodes) {
1450 /* Check to see if there are more
1451 * PLOGIs to be sent
1452 */
1453 lpfc_more_plogi(phba);
1454 }
1455
1456 if (phba->num_disc_nodes == 0) {
1457 phba->fc_flag &= ~FC_NDISC_ACTIVE;
1458 lpfc_can_disctmo(phba);
1459 if (phba->fc_flag & FC_RSCN_MODE) {
1460 /* Check to see if more RSCNs
1461 * came in while we were
1462 * processing this one.
1463 */
1464 if((phba->fc_rscn_id_cnt==0) &&
1465 (!(phba->fc_flag & FC_RSCN_DISCOVERY))) {
1466 phba->fc_flag &= ~FC_RSCN_MODE;
1467 }
1468 else {
1469 lpfc_els_handle_rscn(phba);
1470 }
1471 }
1472 }
1473 }
1474 return;
1475}
1476
1477void
1438lpfc_els_retry_delay(unsigned long ptr) 1478lpfc_els_retry_delay(unsigned long ptr)
1439{ 1479{
1440 struct lpfc_nodelist *ndlp; 1480 struct lpfc_nodelist *ndlp;
@@ -2415,15 +2455,8 @@ lpfc_rscn_recovery_check(struct lpfc_hba * phba)
2415 /* Make sure NLP_DELAY_TMO is NOT running 2455 /* Make sure NLP_DELAY_TMO is NOT running
2416 * after a device recovery event. 2456 * after a device recovery event.
2417 */ 2457 */
2418 if (ndlp->nlp_flag & NLP_DELAY_TMO) { 2458 if (ndlp->nlp_flag & NLP_DELAY_TMO)
2419 ndlp->nlp_flag &= ~NLP_DELAY_TMO; 2459 lpfc_cancel_retry_delay_tmo(phba, ndlp);
2420 ndlp->nlp_last_elscmd = 0;
2421 del_timer_sync(&ndlp->nlp_delayfunc);
2422 if (!list_empty(&ndlp->
2423 els_retry_evt.evt_listp))
2424 list_del_init(&ndlp->
2425 els_retry_evt.evt_listp);
2426 }
2427 } 2460 }
2428 } 2461 }
2429 return 0; 2462 return 0;