diff options
author | James Smart <James.Smart@Emulex.Com> | 2007-04-25 09:52:27 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-06 10:33:14 -0400 |
commit | de0c5b32b50ef2673f4cd434b9c2732237d715dd (patch) | |
tree | b531709da0a9e6a1cc8d18992a7681db4d163f23 /drivers/scsi/lpfc/lpfc_els.c | |
parent | 2534ba756ec407d343af45168273d3a64825a7ba (diff) |
[SCSI] lpfc 8.1.12 : Reorganize lpfc_nlp_list() and callers to prepare for nodelist simplification
Reorganize lpfc_nlp_list() and callers to prepare for nodelist simplification.
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 | 116 |
1 files changed, 46 insertions, 70 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index e3bebf9ee832..14266dfb35db 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -387,8 +387,7 @@ lpfc_cmpl_els_flogi_nport(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, | |||
387 | sizeof(struct lpfc_name)); | 387 | sizeof(struct lpfc_name)); |
388 | memcpy(&ndlp->nlp_nodename, &sp->nodeName, | 388 | memcpy(&ndlp->nlp_nodename, &sp->nodeName, |
389 | sizeof(struct lpfc_name)); | 389 | sizeof(struct lpfc_name)); |
390 | ndlp->nlp_state = NLP_STE_NPR_NODE; | 390 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_NPR_NODE); |
391 | lpfc_nlp_list(phba, ndlp, NLP_NPR_LIST); | ||
392 | ndlp->nlp_flag |= NLP_NPR_2B_DISC; | 391 | ndlp->nlp_flag |= NLP_NPR_2B_DISC; |
393 | } else { | 392 | } else { |
394 | /* This side will wait for the PLOGI */ | 393 | /* This side will wait for the PLOGI */ |
@@ -605,7 +604,7 @@ lpfc_initial_flogi(struct lpfc_hba * phba) | |||
605 | return 0; | 604 | return 0; |
606 | lpfc_nlp_init(phba, ndlp, Fabric_DID); | 605 | lpfc_nlp_init(phba, ndlp, Fabric_DID); |
607 | } else { | 606 | } else { |
608 | lpfc_nlp_list(phba, ndlp, NLP_JUST_DQ); | 607 | lpfc_dequeue_node(phba, ndlp); |
609 | } | 608 | } |
610 | if (lpfc_issue_els_flogi(phba, ndlp, 0)) { | 609 | if (lpfc_issue_els_flogi(phba, ndlp, 0)) { |
611 | mempool_free( ndlp, phba->nlp_mem_pool); | 610 | mempool_free( ndlp, phba->nlp_mem_pool); |
@@ -679,18 +678,15 @@ lpfc_plogi_confirm_nport(struct lpfc_hba * phba, struct lpfc_dmabuf *prsp, | |||
679 | lpfc_unreg_rpi(phba, new_ndlp); | 678 | lpfc_unreg_rpi(phba, new_ndlp); |
680 | new_ndlp->nlp_DID = ndlp->nlp_DID; | 679 | new_ndlp->nlp_DID = ndlp->nlp_DID; |
681 | new_ndlp->nlp_prev_state = ndlp->nlp_prev_state; | 680 | new_ndlp->nlp_prev_state = ndlp->nlp_prev_state; |
682 | new_ndlp->nlp_state = ndlp->nlp_state; | 681 | lpfc_nlp_set_state(phba, new_ndlp, ndlp->nlp_state); |
683 | lpfc_nlp_list(phba, new_ndlp, ndlp->nlp_flag & NLP_LIST_MASK); | ||
684 | 682 | ||
685 | /* Move this back to NPR list */ | 683 | /* Move this back to NPR list */ |
686 | if (memcmp(&ndlp->nlp_portname, name, sizeof(struct lpfc_name)) == 0) { | 684 | if (memcmp(&ndlp->nlp_portname, name, sizeof(struct lpfc_name)) == 0) |
687 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); | 685 | lpfc_drop_node(phba, ndlp); |
688 | } | ||
689 | else { | 686 | else { |
690 | lpfc_unreg_rpi(phba, ndlp); | 687 | lpfc_unreg_rpi(phba, ndlp); |
691 | ndlp->nlp_DID = 0; /* Two ndlps cannot have the same did */ | 688 | ndlp->nlp_DID = 0; /* Two ndlps cannot have the same did */ |
692 | ndlp->nlp_state = NLP_STE_NPR_NODE; | 689 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_NPR_NODE); |
693 | lpfc_nlp_list(phba, ndlp, NLP_NPR_LIST); | ||
694 | } | 690 | } |
695 | return new_ndlp; | 691 | return new_ndlp; |
696 | } | 692 | } |
@@ -704,7 +700,6 @@ lpfc_cmpl_els_plogi(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
704 | struct lpfc_dmabuf *prsp; | 700 | struct lpfc_dmabuf *prsp; |
705 | int disc, rc, did, type; | 701 | int disc, rc, did, type; |
706 | 702 | ||
707 | |||
708 | /* we pass cmdiocb to state machine which needs rspiocb as well */ | 703 | /* we pass cmdiocb to state machine which needs rspiocb as well */ |
709 | cmdiocb->context_un.rsp_iocb = rspiocb; | 704 | cmdiocb->context_un.rsp_iocb = rspiocb; |
710 | 705 | ||
@@ -1538,29 +1533,25 @@ lpfc_els_retry_delay_handler(struct lpfc_nodelist *ndlp) | |||
1538 | case ELS_CMD_PLOGI: | 1533 | case ELS_CMD_PLOGI: |
1539 | if(!lpfc_issue_els_plogi(phba, ndlp->nlp_DID, retry)) { | 1534 | if(!lpfc_issue_els_plogi(phba, ndlp->nlp_DID, retry)) { |
1540 | ndlp->nlp_prev_state = ndlp->nlp_state; | 1535 | ndlp->nlp_prev_state = ndlp->nlp_state; |
1541 | ndlp->nlp_state = NLP_STE_PLOGI_ISSUE; | 1536 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_PLOGI_ISSUE); |
1542 | lpfc_nlp_list(phba, ndlp, NLP_PLOGI_LIST); | ||
1543 | } | 1537 | } |
1544 | break; | 1538 | break; |
1545 | case ELS_CMD_ADISC: | 1539 | case ELS_CMD_ADISC: |
1546 | if (!lpfc_issue_els_adisc(phba, ndlp, retry)) { | 1540 | if (!lpfc_issue_els_adisc(phba, ndlp, retry)) { |
1547 | ndlp->nlp_prev_state = ndlp->nlp_state; | 1541 | ndlp->nlp_prev_state = ndlp->nlp_state; |
1548 | ndlp->nlp_state = NLP_STE_ADISC_ISSUE; | 1542 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_ADISC_ISSUE); |
1549 | lpfc_nlp_list(phba, ndlp, NLP_ADISC_LIST); | ||
1550 | } | 1543 | } |
1551 | break; | 1544 | break; |
1552 | case ELS_CMD_PRLI: | 1545 | case ELS_CMD_PRLI: |
1553 | if (!lpfc_issue_els_prli(phba, ndlp, retry)) { | 1546 | if (!lpfc_issue_els_prli(phba, ndlp, retry)) { |
1554 | ndlp->nlp_prev_state = ndlp->nlp_state; | 1547 | ndlp->nlp_prev_state = ndlp->nlp_state; |
1555 | ndlp->nlp_state = NLP_STE_PRLI_ISSUE; | 1548 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_PRLI_ISSUE); |
1556 | lpfc_nlp_list(phba, ndlp, NLP_PRLI_LIST); | ||
1557 | } | 1549 | } |
1558 | break; | 1550 | break; |
1559 | case ELS_CMD_LOGO: | 1551 | case ELS_CMD_LOGO: |
1560 | if (!lpfc_issue_els_logo(phba, ndlp, retry)) { | 1552 | if (!lpfc_issue_els_logo(phba, ndlp, retry)) { |
1561 | ndlp->nlp_prev_state = ndlp->nlp_state; | 1553 | ndlp->nlp_prev_state = ndlp->nlp_state; |
1562 | ndlp->nlp_state = NLP_STE_NPR_NODE; | 1554 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_NPR_NODE); |
1563 | lpfc_nlp_list(phba, ndlp, NLP_NPR_LIST); | ||
1564 | } | 1555 | } |
1565 | break; | 1556 | break; |
1566 | } | 1557 | } |
@@ -1730,8 +1721,7 @@ lpfc_els_retry(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
1730 | ndlp->nlp_flag |= NLP_DELAY_TMO; | 1721 | ndlp->nlp_flag |= NLP_DELAY_TMO; |
1731 | 1722 | ||
1732 | ndlp->nlp_prev_state = ndlp->nlp_state; | 1723 | ndlp->nlp_prev_state = ndlp->nlp_state; |
1733 | ndlp->nlp_state = NLP_STE_NPR_NODE; | 1724 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_NPR_NODE); |
1734 | lpfc_nlp_list(phba, ndlp, NLP_NPR_LIST); | ||
1735 | ndlp->nlp_last_elscmd = cmd; | 1725 | ndlp->nlp_last_elscmd = cmd; |
1736 | 1726 | ||
1737 | return 1; | 1727 | return 1; |
@@ -1743,27 +1733,24 @@ lpfc_els_retry(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
1743 | case ELS_CMD_PLOGI: | 1733 | case ELS_CMD_PLOGI: |
1744 | if (ndlp) { | 1734 | if (ndlp) { |
1745 | ndlp->nlp_prev_state = ndlp->nlp_state; | 1735 | ndlp->nlp_prev_state = ndlp->nlp_state; |
1746 | ndlp->nlp_state = NLP_STE_PLOGI_ISSUE; | 1736 | lpfc_nlp_set_state(phba, ndlp, |
1747 | lpfc_nlp_list(phba, ndlp, NLP_PLOGI_LIST); | 1737 | NLP_STE_PLOGI_ISSUE); |
1748 | } | 1738 | } |
1749 | lpfc_issue_els_plogi(phba, did, cmdiocb->retry); | 1739 | lpfc_issue_els_plogi(phba, did, cmdiocb->retry); |
1750 | return 1; | 1740 | return 1; |
1751 | case ELS_CMD_ADISC: | 1741 | case ELS_CMD_ADISC: |
1752 | ndlp->nlp_prev_state = ndlp->nlp_state; | 1742 | ndlp->nlp_prev_state = ndlp->nlp_state; |
1753 | ndlp->nlp_state = NLP_STE_ADISC_ISSUE; | 1743 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_ADISC_ISSUE); |
1754 | lpfc_nlp_list(phba, ndlp, NLP_ADISC_LIST); | ||
1755 | lpfc_issue_els_adisc(phba, ndlp, cmdiocb->retry); | 1744 | lpfc_issue_els_adisc(phba, ndlp, cmdiocb->retry); |
1756 | return 1; | 1745 | return 1; |
1757 | case ELS_CMD_PRLI: | 1746 | case ELS_CMD_PRLI: |
1758 | ndlp->nlp_prev_state = ndlp->nlp_state; | 1747 | ndlp->nlp_prev_state = ndlp->nlp_state; |
1759 | ndlp->nlp_state = NLP_STE_PRLI_ISSUE; | 1748 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_PRLI_ISSUE); |
1760 | lpfc_nlp_list(phba, ndlp, NLP_PRLI_LIST); | ||
1761 | lpfc_issue_els_prli(phba, ndlp, cmdiocb->retry); | 1749 | lpfc_issue_els_prli(phba, ndlp, cmdiocb->retry); |
1762 | return 1; | 1750 | return 1; |
1763 | case ELS_CMD_LOGO: | 1751 | case ELS_CMD_LOGO: |
1764 | ndlp->nlp_prev_state = ndlp->nlp_state; | 1752 | ndlp->nlp_prev_state = ndlp->nlp_state; |
1765 | ndlp->nlp_state = NLP_STE_NPR_NODE; | 1753 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_NPR_NODE); |
1766 | lpfc_nlp_list(phba, ndlp, NLP_NPR_LIST); | ||
1767 | lpfc_issue_els_logo(phba, ndlp, cmdiocb->retry); | 1754 | lpfc_issue_els_logo(phba, ndlp, cmdiocb->retry); |
1768 | return 1; | 1755 | return 1; |
1769 | } | 1756 | } |
@@ -1827,7 +1814,7 @@ lpfc_cmpl_els_logo_acc(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
1827 | 1814 | ||
1828 | switch (ndlp->nlp_state) { | 1815 | switch (ndlp->nlp_state) { |
1829 | case NLP_STE_UNUSED_NODE: /* node is just allocated */ | 1816 | case NLP_STE_UNUSED_NODE: /* node is just allocated */ |
1830 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); | 1817 | lpfc_drop_node(phba, ndlp); |
1831 | break; | 1818 | break; |
1832 | case NLP_STE_NPR_NODE: /* NPort Recovery mode */ | 1819 | case NLP_STE_NPR_NODE: /* NPort Recovery mode */ |
1833 | lpfc_unreg_rpi(phba, ndlp); | 1820 | lpfc_unreg_rpi(phba, ndlp); |
@@ -1885,8 +1872,7 @@ lpfc_cmpl_els_acc(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
1885 | mbox->mbox_cmpl = lpfc_mbx_cmpl_reg_login; | 1872 | mbox->mbox_cmpl = lpfc_mbx_cmpl_reg_login; |
1886 | mbox->context2 = ndlp; | 1873 | mbox->context2 = ndlp; |
1887 | ndlp->nlp_prev_state = ndlp->nlp_state; | 1874 | ndlp->nlp_prev_state = ndlp->nlp_state; |
1888 | ndlp->nlp_state = NLP_STE_REG_LOGIN_ISSUE; | 1875 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_REG_LOGIN_ISSUE); |
1889 | lpfc_nlp_list(phba, ndlp, NLP_REGLOGIN_LIST); | ||
1890 | if (lpfc_sli_issue_mbox(phba, mbox, | 1876 | if (lpfc_sli_issue_mbox(phba, mbox, |
1891 | (MBX_NOWAIT | MBX_STOP_IOCB)) | 1877 | (MBX_NOWAIT | MBX_STOP_IOCB)) |
1892 | != MBX_NOT_FINISHED) { | 1878 | != MBX_NOT_FINISHED) { |
@@ -1901,7 +1887,7 @@ lpfc_cmpl_els_acc(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
1901 | (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || | 1887 | (irsp->un.ulpWord[4] == IOERR_LINK_DOWN) || |
1902 | (irsp->un.ulpWord[4] == IOERR_SLI_DOWN)))) { | 1888 | (irsp->un.ulpWord[4] == IOERR_SLI_DOWN)))) { |
1903 | if (ndlp->nlp_flag & NLP_ACC_REGLOGIN) { | 1889 | if (ndlp->nlp_flag & NLP_ACC_REGLOGIN) { |
1904 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); | 1890 | lpfc_drop_node(phba, ndlp); |
1905 | ndlp = NULL; | 1891 | ndlp = NULL; |
1906 | } | 1892 | } |
1907 | } | 1893 | } |
@@ -2311,9 +2297,8 @@ lpfc_els_disc_adisc(struct lpfc_hba * phba) | |||
2311 | if (ndlp->nlp_flag & NLP_NPR_ADISC) { | 2297 | if (ndlp->nlp_flag & NLP_NPR_ADISC) { |
2312 | ndlp->nlp_flag &= ~NLP_NPR_ADISC; | 2298 | ndlp->nlp_flag &= ~NLP_NPR_ADISC; |
2313 | ndlp->nlp_prev_state = ndlp->nlp_state; | 2299 | ndlp->nlp_prev_state = ndlp->nlp_state; |
2314 | ndlp->nlp_state = NLP_STE_ADISC_ISSUE; | 2300 | lpfc_nlp_set_state(phba, ndlp, |
2315 | lpfc_nlp_list(phba, ndlp, | 2301 | NLP_STE_ADISC_ISSUE); |
2316 | NLP_ADISC_LIST); | ||
2317 | lpfc_issue_els_adisc(phba, ndlp, 0); | 2302 | lpfc_issue_els_adisc(phba, ndlp, 0); |
2318 | sentadisc++; | 2303 | sentadisc++; |
2319 | phba->num_disc_nodes++; | 2304 | phba->num_disc_nodes++; |
@@ -2349,8 +2334,8 @@ lpfc_els_disc_plogi(struct lpfc_hba * phba) | |||
2349 | (!(ndlp->nlp_flag & NLP_DELAY_TMO))) { | 2334 | (!(ndlp->nlp_flag & NLP_DELAY_TMO))) { |
2350 | if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { | 2335 | if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { |
2351 | ndlp->nlp_prev_state = ndlp->nlp_state; | 2336 | ndlp->nlp_prev_state = ndlp->nlp_state; |
2352 | ndlp->nlp_state = NLP_STE_PLOGI_ISSUE; | 2337 | lpfc_nlp_set_state(phba, ndlp, |
2353 | lpfc_nlp_list(phba, ndlp, NLP_PLOGI_LIST); | 2338 | NLP_STE_PLOGI_ISSUE); |
2354 | lpfc_issue_els_plogi(phba, ndlp->nlp_DID, 0); | 2339 | lpfc_issue_els_plogi(phba, ndlp->nlp_DID, 0); |
2355 | sentplogi++; | 2340 | sentplogi++; |
2356 | phba->num_disc_nodes++; | 2341 | phba->num_disc_nodes++; |
@@ -2647,8 +2632,7 @@ lpfc_els_handle_rscn(struct lpfc_hba * phba) | |||
2647 | lpfc_nlp_init(phba, ndlp, NameServer_DID); | 2632 | lpfc_nlp_init(phba, ndlp, NameServer_DID); |
2648 | ndlp->nlp_type |= NLP_FABRIC; | 2633 | ndlp->nlp_type |= NLP_FABRIC; |
2649 | ndlp->nlp_prev_state = ndlp->nlp_state; | 2634 | ndlp->nlp_prev_state = ndlp->nlp_state; |
2650 | ndlp->nlp_state = NLP_STE_PLOGI_ISSUE; | 2635 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_PLOGI_ISSUE); |
2651 | lpfc_nlp_list(phba, ndlp, NLP_PLOGI_LIST); | ||
2652 | lpfc_issue_els_plogi(phba, NameServer_DID, 0); | 2636 | lpfc_issue_els_plogi(phba, NameServer_DID, 0); |
2653 | /* Wait for NameServer login cmpl before we can | 2637 | /* Wait for NameServer login cmpl before we can |
2654 | continue */ | 2638 | continue */ |
@@ -3074,8 +3058,8 @@ lpfc_els_rcv_farp(struct lpfc_hba * phba, | |||
3074 | /* Log back into the node before sending the FARP. */ | 3058 | /* Log back into the node before sending the FARP. */ |
3075 | if (fp->Rflags & FARP_REQUEST_PLOGI) { | 3059 | if (fp->Rflags & FARP_REQUEST_PLOGI) { |
3076 | ndlp->nlp_prev_state = ndlp->nlp_state; | 3060 | ndlp->nlp_prev_state = ndlp->nlp_state; |
3077 | ndlp->nlp_state = NLP_STE_PLOGI_ISSUE; | 3061 | lpfc_nlp_set_state(phba, ndlp, |
3078 | lpfc_nlp_list(phba, ndlp, NLP_PLOGI_LIST); | 3062 | NLP_STE_PLOGI_ISSUE); |
3079 | lpfc_issue_els_plogi(phba, ndlp->nlp_DID, 0); | 3063 | lpfc_issue_els_plogi(phba, ndlp->nlp_DID, 0); |
3080 | } | 3064 | } |
3081 | 3065 | ||
@@ -3159,7 +3143,7 @@ lpfc_els_rcv_fan(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
3159 | * Clean up old Fabric, Nameserver and | 3143 | * Clean up old Fabric, Nameserver and |
3160 | * other NLP_FABRIC logins | 3144 | * other NLP_FABRIC logins |
3161 | */ | 3145 | */ |
3162 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); | 3146 | lpfc_drop_node(phba, ndlp); |
3163 | } else if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { | 3147 | } else if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) { |
3164 | /* Fail outstanding I/O now since this | 3148 | /* Fail outstanding I/O now since this |
3165 | * device is marked for PLOGI | 3149 | * device is marked for PLOGI |
@@ -3182,14 +3166,14 @@ lpfc_els_rcv_fan(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, | |||
3182 | switch (ndlp->nlp_prev_state) { | 3166 | switch (ndlp->nlp_prev_state) { |
3183 | case NLP_STE_UNMAPPED_NODE: | 3167 | case NLP_STE_UNMAPPED_NODE: |
3184 | ndlp->nlp_prev_state = NLP_STE_NPR_NODE; | 3168 | ndlp->nlp_prev_state = NLP_STE_NPR_NODE; |
3185 | ndlp->nlp_state = NLP_STE_UNMAPPED_NODE; | 3169 | lpfc_nlp_set_state(phba, ndlp, |
3186 | lpfc_nlp_list(phba, ndlp, NLP_UNMAPPED_LIST); | 3170 | NLP_STE_UNMAPPED_NODE); |
3187 | break; | 3171 | break; |
3188 | 3172 | ||
3189 | case NLP_STE_MAPPED_NODE: | 3173 | case NLP_STE_MAPPED_NODE: |
3190 | ndlp->nlp_prev_state = NLP_STE_NPR_NODE; | 3174 | ndlp->nlp_prev_state = NLP_STE_NPR_NODE; |
3191 | ndlp->nlp_state = NLP_STE_MAPPED_NODE; | 3175 | lpfc_nlp_set_state(phba, ndlp, |
3192 | lpfc_nlp_list(phba, ndlp, NLP_MAPPED_LIST); | 3176 | NLP_STE_MAPPED_NODE); |
3193 | break; | 3177 | break; |
3194 | 3178 | ||
3195 | default: | 3179 | default: |
@@ -3431,8 +3415,7 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3431 | if ((did & Fabric_DID_MASK) == Fabric_DID_MASK) { | 3415 | if ((did & Fabric_DID_MASK) == Fabric_DID_MASK) { |
3432 | ndlp->nlp_type |= NLP_FABRIC; | 3416 | ndlp->nlp_type |= NLP_FABRIC; |
3433 | } | 3417 | } |
3434 | ndlp->nlp_state = NLP_STE_UNUSED_NODE; | 3418 | lpfc_nlp_set_state(phba, ndlp, NLP_STE_UNUSED_NODE); |
3435 | lpfc_nlp_list(phba, ndlp, NLP_UNUSED_LIST); | ||
3436 | } | 3419 | } |
3437 | 3420 | ||
3438 | phba->fc_stat.elsRcvFrame++; | 3421 | phba->fc_stat.elsRcvFrame++; |
@@ -3460,9 +3443,8 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3460 | case ELS_CMD_FLOGI: | 3443 | case ELS_CMD_FLOGI: |
3461 | phba->fc_stat.elsRcvFLOGI++; | 3444 | phba->fc_stat.elsRcvFLOGI++; |
3462 | lpfc_els_rcv_flogi(phba, elsiocb, ndlp, newnode); | 3445 | lpfc_els_rcv_flogi(phba, elsiocb, ndlp, newnode); |
3463 | if (newnode) { | 3446 | if (newnode) |
3464 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); | 3447 | lpfc_drop_node(phba, ndlp); |
3465 | } | ||
3466 | break; | 3448 | break; |
3467 | case ELS_CMD_LOGO: | 3449 | case ELS_CMD_LOGO: |
3468 | phba->fc_stat.elsRcvLOGO++; | 3450 | phba->fc_stat.elsRcvLOGO++; |
@@ -3483,9 +3465,8 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3483 | case ELS_CMD_RSCN: | 3465 | case ELS_CMD_RSCN: |
3484 | phba->fc_stat.elsRcvRSCN++; | 3466 | phba->fc_stat.elsRcvRSCN++; |
3485 | lpfc_els_rcv_rscn(phba, elsiocb, ndlp, newnode); | 3467 | lpfc_els_rcv_rscn(phba, elsiocb, ndlp, newnode); |
3486 | if (newnode) { | 3468 | if (newnode) |
3487 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); | 3469 | lpfc_drop_node(phba, ndlp); |
3488 | } | ||
3489 | break; | 3470 | break; |
3490 | case ELS_CMD_ADISC: | 3471 | case ELS_CMD_ADISC: |
3491 | phba->fc_stat.elsRcvADISC++; | 3472 | phba->fc_stat.elsRcvADISC++; |
@@ -3526,30 +3507,26 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3526 | case ELS_CMD_LIRR: | 3507 | case ELS_CMD_LIRR: |
3527 | phba->fc_stat.elsRcvLIRR++; | 3508 | phba->fc_stat.elsRcvLIRR++; |
3528 | lpfc_els_rcv_lirr(phba, elsiocb, ndlp); | 3509 | lpfc_els_rcv_lirr(phba, elsiocb, ndlp); |
3529 | if (newnode) { | 3510 | if (newnode) |
3530 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); | 3511 | lpfc_drop_node(phba, ndlp); |
3531 | } | ||
3532 | break; | 3512 | break; |
3533 | case ELS_CMD_RPS: | 3513 | case ELS_CMD_RPS: |
3534 | phba->fc_stat.elsRcvRPS++; | 3514 | phba->fc_stat.elsRcvRPS++; |
3535 | lpfc_els_rcv_rps(phba, elsiocb, ndlp); | 3515 | lpfc_els_rcv_rps(phba, elsiocb, ndlp); |
3536 | if (newnode) { | 3516 | if (newnode) |
3537 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); | 3517 | lpfc_drop_node(phba, ndlp); |
3538 | } | ||
3539 | break; | 3518 | break; |
3540 | case ELS_CMD_RPL: | 3519 | case ELS_CMD_RPL: |
3541 | phba->fc_stat.elsRcvRPL++; | 3520 | phba->fc_stat.elsRcvRPL++; |
3542 | lpfc_els_rcv_rpl(phba, elsiocb, ndlp); | 3521 | lpfc_els_rcv_rpl(phba, elsiocb, ndlp); |
3543 | if (newnode) { | 3522 | if (newnode) |
3544 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); | 3523 | lpfc_drop_node(phba, ndlp); |
3545 | } | ||
3546 | break; | 3524 | break; |
3547 | case ELS_CMD_RNID: | 3525 | case ELS_CMD_RNID: |
3548 | phba->fc_stat.elsRcvRNID++; | 3526 | phba->fc_stat.elsRcvRNID++; |
3549 | lpfc_els_rcv_rnid(phba, elsiocb, ndlp); | 3527 | lpfc_els_rcv_rnid(phba, elsiocb, ndlp); |
3550 | if (newnode) { | 3528 | if (newnode) |
3551 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); | 3529 | lpfc_drop_node(phba, ndlp); |
3552 | } | ||
3553 | break; | 3530 | break; |
3554 | default: | 3531 | default: |
3555 | /* Unsupported ELS command, reject */ | 3532 | /* Unsupported ELS command, reject */ |
@@ -3559,9 +3536,8 @@ lpfc_els_unsol_event(struct lpfc_hba * phba, | |||
3559 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 3536 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, |
3560 | "%d:0115 Unknown ELS command x%x received from " | 3537 | "%d:0115 Unknown ELS command x%x received from " |
3561 | "NPORT x%x\n", phba->brd_no, cmd, did); | 3538 | "NPORT x%x\n", phba->brd_no, cmd, did); |
3562 | if (newnode) { | 3539 | if (newnode) |
3563 | lpfc_nlp_list(phba, ndlp, NLP_NO_LIST); | 3540 | lpfc_drop_node(phba, ndlp); |
3564 | } | ||
3565 | break; | 3541 | break; |
3566 | } | 3542 | } |
3567 | 3543 | ||