diff options
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_crtn.h | 1 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 51 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 24 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nportdisc.c | 21 |
4 files changed, 52 insertions, 45 deletions
diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index 7b6534a1c315..f716c1d85f41 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h | |||
@@ -84,6 +84,7 @@ int lpfc_els_rsp_adisc_acc(struct lpfc_hba *, struct lpfc_iocbq *, | |||
84 | struct lpfc_nodelist *); | 84 | struct lpfc_nodelist *); |
85 | int lpfc_els_rsp_prli_acc(struct lpfc_hba *, struct lpfc_iocbq *, | 85 | int lpfc_els_rsp_prli_acc(struct lpfc_hba *, struct lpfc_iocbq *, |
86 | struct lpfc_nodelist *); | 86 | struct lpfc_nodelist *); |
87 | void lpfc_cancel_retry_delay_tmo(struct lpfc_hba *, struct lpfc_nodelist *); | ||
87 | void lpfc_els_retry_delay(unsigned long); | 88 | void lpfc_els_retry_delay(unsigned long); |
88 | void lpfc_els_retry_delay_handler(struct lpfc_nodelist *); | 89 | void lpfc_els_retry_delay_handler(struct lpfc_nodelist *); |
89 | void lpfc_els_unsol_event(struct lpfc_hba *, struct lpfc_sli_ring *, | 90 | void lpfc_els_unsol_event(struct lpfc_hba *, struct lpfc_sli_ring *, |
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 | ||
1437 | void | 1437 | void |
1438 | lpfc_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 | |||
1477 | void | ||
1438 | lpfc_els_retry_delay(unsigned long ptr) | 1478 | lpfc_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; |
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 2b227b363ae3..e15120d21aaa 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -1152,13 +1152,9 @@ lpfc_nlp_list(struct lpfc_hba * phba, struct lpfc_nodelist * nlp, int list) | |||
1152 | /* Stop delay tmo if taking node off NPR list */ | 1152 | /* Stop delay tmo if taking node off NPR list */ |
1153 | if ((nlp->nlp_flag & NLP_DELAY_TMO) && | 1153 | if ((nlp->nlp_flag & NLP_DELAY_TMO) && |
1154 | (list != NLP_NPR_LIST)) { | 1154 | (list != NLP_NPR_LIST)) { |
1155 | nlp->nlp_flag &= ~NLP_DELAY_TMO; | ||
1156 | nlp->nlp_last_elscmd = 0; | ||
1157 | spin_unlock_irq(phba->host->host_lock); | 1155 | spin_unlock_irq(phba->host->host_lock); |
1158 | del_timer_sync(&nlp->nlp_delayfunc); | 1156 | lpfc_cancel_retry_delay_tmo(phba, nlp); |
1159 | spin_lock_irq(phba->host->host_lock); | 1157 | spin_lock_irq(phba->host->host_lock); |
1160 | if (!list_empty(&nlp->els_retry_evt.evt_listp)) | ||
1161 | list_del_init(&nlp->els_retry_evt.evt_listp); | ||
1162 | } | 1158 | } |
1163 | break; | 1159 | break; |
1164 | } | 1160 | } |
@@ -1598,13 +1594,7 @@ lpfc_nlp_remove(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp) | |||
1598 | 1594 | ||
1599 | 1595 | ||
1600 | if (ndlp->nlp_flag & NLP_DELAY_TMO) { | 1596 | if (ndlp->nlp_flag & NLP_DELAY_TMO) { |
1601 | spin_lock_irq(phba->host->host_lock); | 1597 | lpfc_cancel_retry_delay_tmo(phba, ndlp); |
1602 | ndlp->nlp_flag &= ~NLP_DELAY_TMO; | ||
1603 | spin_unlock_irq(phba->host->host_lock); | ||
1604 | ndlp->nlp_last_elscmd = 0; | ||
1605 | del_timer_sync(&ndlp->nlp_delayfunc); | ||
1606 | if (!list_empty(&ndlp->els_retry_evt.evt_listp)) | ||
1607 | list_del_init(&ndlp->els_retry_evt.evt_listp); | ||
1608 | } | 1598 | } |
1609 | 1599 | ||
1610 | if (ndlp->nlp_disc_refcnt) { | 1600 | if (ndlp->nlp_disc_refcnt) { |
@@ -1896,14 +1886,8 @@ lpfc_setup_disc_node(struct lpfc_hba * phba, uint32_t did) | |||
1896 | /* Since this node is marked for discovery, | 1886 | /* Since this node is marked for discovery, |
1897 | * delay timeout is not needed. | 1887 | * delay timeout is not needed. |
1898 | */ | 1888 | */ |
1899 | if (ndlp->nlp_flag & NLP_DELAY_TMO) { | 1889 | if (ndlp->nlp_flag & NLP_DELAY_TMO) |
1900 | ndlp->nlp_flag &= ~NLP_DELAY_TMO; | 1890 | lpfc_cancel_retry_delay_tmo(phba, ndlp); |
1901 | del_timer_sync(&ndlp->nlp_delayfunc); | ||
1902 | if (!list_empty(&ndlp->els_retry_evt. | ||
1903 | evt_listp)) | ||
1904 | list_del_init(&ndlp->els_retry_evt. | ||
1905 | evt_listp); | ||
1906 | } | ||
1907 | } else { | 1891 | } else { |
1908 | ndlp->nlp_flag &= ~NLP_NPR_2B_DISC; | 1892 | ndlp->nlp_flag &= ~NLP_NPR_2B_DISC; |
1909 | ndlp = NULL; | 1893 | ndlp = NULL; |
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 8affc1543c6e..3d77bd999b70 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c | |||
@@ -259,13 +259,8 @@ lpfc_els_abort(struct lpfc_hba * phba, struct lpfc_nodelist * ndlp, | |||
259 | } while(found); | 259 | } while(found); |
260 | 260 | ||
261 | /* If we are delaying issuing an ELS command, cancel it */ | 261 | /* If we are delaying issuing an ELS command, cancel it */ |
262 | if (ndlp->nlp_flag & NLP_DELAY_TMO) { | 262 | if (ndlp->nlp_flag & NLP_DELAY_TMO) |
263 | ndlp->nlp_flag &= ~NLP_DELAY_TMO; | 263 | lpfc_cancel_retry_delay_tmo(phba, ndlp); |
264 | ndlp->nlp_last_elscmd = 0; | ||
265 | del_timer_sync(&ndlp->nlp_delayfunc); | ||
266 | if (!list_empty(&ndlp->els_retry_evt.evt_listp)) | ||
267 | list_del_init(&ndlp->els_retry_evt.evt_listp); | ||
268 | } | ||
269 | return 0; | 264 | return 0; |
270 | } | 265 | } |
271 | 266 | ||
@@ -1496,7 +1491,7 @@ lpfc_rcv_plogi_npr_node(struct lpfc_hba * phba, | |||
1496 | 1491 | ||
1497 | if (lpfc_rcv_plogi(phba, ndlp, cmdiocb)) { | 1492 | if (lpfc_rcv_plogi(phba, ndlp, cmdiocb)) { |
1498 | spin_lock_irq(phba->host->host_lock); | 1493 | spin_lock_irq(phba->host->host_lock); |
1499 | ndlp->nlp_flag &= ~(NLP_NPR_ADISC | NLP_NPR_2B_DISC); | 1494 | ndlp->nlp_flag &= ~NLP_NPR_ADISC; |
1500 | spin_unlock_irq(phba->host->host_lock); | 1495 | spin_unlock_irq(phba->host->host_lock); |
1501 | return ndlp->nlp_state; | 1496 | return ndlp->nlp_state; |
1502 | } | 1497 | } |
@@ -1693,16 +1688,10 @@ lpfc_device_recov_npr_node(struct lpfc_hba * phba, | |||
1693 | { | 1688 | { |
1694 | spin_lock_irq(phba->host->host_lock); | 1689 | spin_lock_irq(phba->host->host_lock); |
1695 | ndlp->nlp_flag &= ~NLP_NPR_2B_DISC; | 1690 | ndlp->nlp_flag &= ~NLP_NPR_2B_DISC; |
1691 | spin_unlock_irq(phba->host->host_lock); | ||
1696 | if (ndlp->nlp_flag & NLP_DELAY_TMO) { | 1692 | if (ndlp->nlp_flag & NLP_DELAY_TMO) { |
1697 | ndlp->nlp_flag &= ~NLP_DELAY_TMO; | 1693 | lpfc_cancel_retry_delay_tmo(phba, ndlp); |
1698 | if (!list_empty(&ndlp->els_retry_evt.evt_listp)) | ||
1699 | list_del_init(&ndlp->els_retry_evt.evt_listp); | ||
1700 | spin_unlock_irq(phba->host->host_lock); | ||
1701 | ndlp->nlp_last_elscmd = 0; | ||
1702 | del_timer_sync(&ndlp->nlp_delayfunc); | ||
1703 | return ndlp->nlp_state; | ||
1704 | } | 1694 | } |
1705 | spin_unlock_irq(phba->host->host_lock); | ||
1706 | return ndlp->nlp_state; | 1695 | return ndlp->nlp_state; |
1707 | } | 1696 | } |
1708 | 1697 | ||