diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 533 |
1 files changed, 221 insertions, 312 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 4aed0cffe92f..9365e19696e2 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -63,10 +63,10 @@ lpfc_els_chk_latt(struct lpfc_vport *vport) | |||
63 | return 0; | 63 | return 0; |
64 | 64 | ||
65 | /* Pending Link Event during Discovery */ | 65 | /* Pending Link Event during Discovery */ |
66 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 66 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
67 | "%d (%d):0237 Pending Link Event during " | 67 | "0237 Pending Link Event during " |
68 | "Discovery: State x%x\n", | 68 | "Discovery: State x%x\n", |
69 | phba->brd_no, vport->vpi, phba->pport->port_state); | 69 | phba->pport->port_state); |
70 | 70 | ||
71 | /* CLEAR_LA should re-enable link attention events and | 71 | /* CLEAR_LA should re-enable link attention events and |
72 | * we should then imediately take a LATT event. The | 72 | * we should then imediately take a LATT event. The |
@@ -208,23 +208,21 @@ lpfc_prep_els_iocb(struct lpfc_vport *vport, uint8_t expectRsp, | |||
208 | if (prsp) { | 208 | if (prsp) { |
209 | list_add(&prsp->list, &pcmd->list); | 209 | list_add(&prsp->list, &pcmd->list); |
210 | } | 210 | } |
211 | |||
212 | if (expectRsp) { | 211 | if (expectRsp) { |
213 | /* Xmit ELS command <elsCmd> to remote NPORT <did> */ | 212 | /* Xmit ELS command <elsCmd> to remote NPORT <did> */ |
214 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 213 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
215 | "%d (%d):0116 Xmit ELS command x%x to remote " | 214 | "0116 Xmit ELS command x%x to remote " |
216 | "NPORT x%x I/O tag: x%x, port state: x%x\n", | 215 | "NPORT x%x I/O tag: x%x, port state: x%x\n", |
217 | phba->brd_no, vport->vpi, elscmd, did, | 216 | elscmd, did, elsiocb->iotag, |
218 | elsiocb->iotag, vport->port_state); | 217 | vport->port_state); |
219 | } else { | 218 | } else { |
220 | /* Xmit ELS response <elsCmd> to remote NPORT <did> */ | 219 | /* Xmit ELS response <elsCmd> to remote NPORT <did> */ |
221 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 220 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
222 | "%d (%d):0117 Xmit ELS response x%x to remote " | 221 | "0117 Xmit ELS response x%x to remote " |
223 | "NPORT x%x I/O tag: x%x, size: x%x\n", | 222 | "NPORT x%x I/O tag: x%x, size: x%x\n", |
224 | phba->brd_no, vport->vpi, elscmd, | 223 | elscmd, ndlp->nlp_DID, elsiocb->iotag, |
225 | ndlp->nlp_DID, elsiocb->iotag, cmdSize); | 224 | cmdSize); |
226 | } | 225 | } |
227 | |||
228 | return elsiocb; | 226 | return elsiocb; |
229 | } | 227 | } |
230 | 228 | ||
@@ -285,9 +283,8 @@ fail_free_mbox: | |||
285 | 283 | ||
286 | fail: | 284 | fail: |
287 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 285 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
288 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 286 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
289 | "%d (%d):0249 Cannot issue Register Fabric login\n", | 287 | "0249 Cannot issue Register Fabric login\n"); |
290 | phba->brd_no, vport->vpi); | ||
291 | return -ENXIO; | 288 | return -ENXIO; |
292 | } | 289 | } |
293 | 290 | ||
@@ -340,20 +337,19 @@ lpfc_cmpl_els_flogi_fabric(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
340 | 337 | ||
341 | if (phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) { | 338 | if (phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) { |
342 | if (sp->cmn.response_multiple_NPort) { | 339 | if (sp->cmn.response_multiple_NPort) { |
343 | lpfc_printf_log(phba, KERN_WARNING, LOG_ELS | LOG_VPORT, | 340 | lpfc_printf_vlog(vport, KERN_WARNING, |
344 | "%d:1816 FLOGI NPIV supported, " | 341 | LOG_ELS | LOG_VPORT, |
345 | "response data 0x%x\n", | 342 | "1816 FLOGI NPIV supported, " |
346 | phba->brd_no, | 343 | "response data 0x%x\n", |
347 | sp->cmn.response_multiple_NPort); | 344 | sp->cmn.response_multiple_NPort); |
348 | phba->link_flag |= LS_NPIV_FAB_SUPPORTED; | 345 | phba->link_flag |= LS_NPIV_FAB_SUPPORTED; |
349 | |||
350 | } else { | 346 | } else { |
351 | /* Because we asked f/w for NPIV it still expects us | 347 | /* Because we asked f/w for NPIV it still expects us |
352 | to call reg_vnpid atleast for the physcial host */ | 348 | to call reg_vnpid atleast for the physcial host */ |
353 | lpfc_printf_log(phba, KERN_WARNING, LOG_ELS | LOG_VPORT, | 349 | lpfc_printf_vlog(vport, KERN_WARNING, |
354 | "%d:1817 Fabric does not support NPIV " | 350 | LOG_ELS | LOG_VPORT, |
355 | "- configuring single port mode.\n", | 351 | "1817 Fabric does not support NPIV " |
356 | phba->brd_no); | 352 | "- configuring single port mode.\n"); |
357 | phba->link_flag &= ~LS_NPIV_FAB_SUPPORTED; | 353 | phba->link_flag &= ~LS_NPIV_FAB_SUPPORTED; |
358 | } | 354 | } |
359 | } | 355 | } |
@@ -522,12 +518,11 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
522 | } | 518 | } |
523 | 519 | ||
524 | /* FLOGI failure */ | 520 | /* FLOGI failure */ |
525 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 521 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
526 | "%d (%d):0100 FLOGI failure Data: x%x x%x " | 522 | "0100 FLOGI failure Data: x%x x%x " |
527 | "x%x\n", | 523 | "x%x\n", |
528 | phba->brd_no, vport->vpi, | 524 | irsp->ulpStatus, irsp->un.ulpWord[4], |
529 | irsp->ulpStatus, irsp->un.ulpWord[4], | 525 | irsp->ulpTimeout); |
530 | irsp->ulpTimeout); | ||
531 | goto flogifail; | 526 | goto flogifail; |
532 | } | 527 | } |
533 | 528 | ||
@@ -540,12 +535,11 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
540 | sp = prsp->virt + sizeof(uint32_t); | 535 | sp = prsp->virt + sizeof(uint32_t); |
541 | 536 | ||
542 | /* FLOGI completes successfully */ | 537 | /* FLOGI completes successfully */ |
543 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 538 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
544 | "%d (%d):0101 FLOGI completes sucessfully " | 539 | "0101 FLOGI completes sucessfully " |
545 | "Data: x%x x%x x%x x%x\n", | 540 | "Data: x%x x%x x%x x%x\n", |
546 | phba->brd_no, vport->vpi, | 541 | irsp->un.ulpWord[4], sp->cmn.e_d_tov, |
547 | irsp->un.ulpWord[4], sp->cmn.e_d_tov, | 542 | sp->cmn.w2.r_a_tov, sp->cmn.edtovResolution); |
548 | sp->cmn.w2.r_a_tov, sp->cmn.edtovResolution); | ||
549 | 543 | ||
550 | if (vport->port_state == LPFC_FLOGI) { | 544 | if (vport->port_state == LPFC_FLOGI) { |
551 | /* | 545 | /* |
@@ -662,8 +656,8 @@ lpfc_els_abort_flogi(struct lpfc_hba *phba) | |||
662 | 656 | ||
663 | /* Abort outstanding I/O on NPort <nlp_DID> */ | 657 | /* Abort outstanding I/O on NPort <nlp_DID> */ |
664 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 658 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, |
665 | "%d:0201 Abort outstanding I/O on NPort x%x\n", | 659 | "0201 Abort outstanding I/O on NPort x%x\n", |
666 | phba->brd_no, Fabric_DID); | 660 | Fabric_DID); |
667 | 661 | ||
668 | pring = &phba->sli.ring[LPFC_ELS_RING]; | 662 | pring = &phba->sli.ring[LPFC_ELS_RING]; |
669 | 663 | ||
@@ -736,18 +730,16 @@ static void | |||
736 | lpfc_more_plogi(struct lpfc_vport *vport) | 730 | lpfc_more_plogi(struct lpfc_vport *vport) |
737 | { | 731 | { |
738 | int sentplogi; | 732 | int sentplogi; |
739 | struct lpfc_hba *phba = vport->phba; | ||
740 | 733 | ||
741 | if (vport->num_disc_nodes) | 734 | if (vport->num_disc_nodes) |
742 | vport->num_disc_nodes--; | 735 | vport->num_disc_nodes--; |
743 | 736 | ||
744 | /* Continue discovery with <num_disc_nodes> PLOGIs to go */ | 737 | /* Continue discovery with <num_disc_nodes> PLOGIs to go */ |
745 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 738 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
746 | "%d (%d):0232 Continue discovery with %d PLOGIs to go " | 739 | "0232 Continue discovery with %d PLOGIs to go " |
747 | "Data: x%x x%x x%x\n", | 740 | "Data: x%x x%x x%x\n", |
748 | phba->brd_no, vport->vpi, vport->num_disc_nodes, | 741 | vport->num_disc_nodes, vport->fc_plogi_cnt, |
749 | vport->fc_plogi_cnt, vport->fc_flag, vport->port_state); | 742 | vport->fc_flag, vport->port_state); |
750 | |||
751 | /* Check to see if there are more PLOGIs to be sent */ | 743 | /* Check to see if there are more PLOGIs to be sent */ |
752 | if (vport->fc_flag & FC_NLP_MORE) | 744 | if (vport->fc_flag & FC_NLP_MORE) |
753 | /* go thru NPR nodes and issue any remaining ELS PLOGIs */ | 745 | /* go thru NPR nodes and issue any remaining ELS PLOGIs */ |
@@ -833,11 +825,12 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
833 | 825 | ||
834 | ndlp = lpfc_findnode_did(vport, irsp->un.elsreq64.remoteID); | 826 | ndlp = lpfc_findnode_did(vport, irsp->un.elsreq64.remoteID); |
835 | if (!ndlp) { | 827 | if (!ndlp) { |
836 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 828 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
837 | "%d (%d):0136 PLOGI completes to NPort x%x " | 829 | "0136 PLOGI completes to NPort x%x " |
838 | "with no ndlp. Data: x%x x%x x%x\n", | 830 | "with no ndlp. Data: x%x x%x x%x\n", |
839 | phba->brd_no, vport->vpi, irsp->un.elsreq64.remoteID, | 831 | irsp->un.elsreq64.remoteID, |
840 | irsp->ulpStatus, irsp->un.ulpWord[4], irsp->ulpIoTag); | 832 | irsp->ulpStatus, irsp->un.ulpWord[4], |
833 | irsp->ulpIoTag); | ||
841 | goto out; | 834 | goto out; |
842 | } | 835 | } |
843 | 836 | ||
@@ -851,13 +844,11 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
851 | rc = 0; | 844 | rc = 0; |
852 | 845 | ||
853 | /* PLOGI completes to NPort <nlp_DID> */ | 846 | /* PLOGI completes to NPort <nlp_DID> */ |
854 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 847 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
855 | "%d (%d):0102 PLOGI completes to NPort x%x " | 848 | "0102 PLOGI completes to NPort x%x " |
856 | "Data: x%x x%x x%x x%x x%x\n", | 849 | "Data: x%x x%x x%x x%x x%x\n", |
857 | phba->brd_no, vport->vpi, ndlp->nlp_DID, | 850 | ndlp->nlp_DID, irsp->ulpStatus, irsp->un.ulpWord[4], |
858 | irsp->ulpStatus, irsp->un.ulpWord[4], | 851 | irsp->ulpTimeout, disc, vport->num_disc_nodes); |
859 | irsp->ulpTimeout, disc, vport->num_disc_nodes); | ||
860 | |||
861 | /* Check to see if link went down during discovery */ | 852 | /* Check to see if link went down during discovery */ |
862 | if (lpfc_els_chk_latt(vport)) { | 853 | if (lpfc_els_chk_latt(vport)) { |
863 | spin_lock_irq(shost->host_lock); | 854 | spin_lock_irq(shost->host_lock); |
@@ -881,17 +872,14 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
881 | } | 872 | } |
882 | goto out; | 873 | goto out; |
883 | } | 874 | } |
884 | |||
885 | /* PLOGI failed */ | 875 | /* PLOGI failed */ |
886 | if (ndlp->nlp_DID == NameServer_DID) { | 876 | if (ndlp->nlp_DID == NameServer_DID) { |
887 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 877 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
888 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 878 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
889 | "%d (%d):0250 Nameserver login error: " | 879 | "0250 Nameserver login error: " |
890 | "0x%x / 0x%x\n", | 880 | "0x%x / 0x%x\n", |
891 | phba->brd_no, vport->vpi, | 881 | irsp->ulpStatus, irsp->un.ulpWord[4]); |
892 | irsp->ulpStatus, irsp->un.ulpWord[4]); | ||
893 | } | 882 | } |
894 | |||
895 | /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ | 883 | /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ |
896 | if (lpfc_error_lost_link(irsp)) { | 884 | if (lpfc_error_lost_link(irsp)) { |
897 | rc = NLP_STE_FREED_NODE; | 885 | rc = NLP_STE_FREED_NODE; |
@@ -1017,14 +1005,12 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1017 | "PRLI cmpl: status:x%x/x%x did:x%x", | 1005 | "PRLI cmpl: status:x%x/x%x did:x%x", |
1018 | irsp->ulpStatus, irsp->un.ulpWord[4], | 1006 | irsp->ulpStatus, irsp->un.ulpWord[4], |
1019 | ndlp->nlp_DID); | 1007 | ndlp->nlp_DID); |
1020 | |||
1021 | /* PRLI completes to NPort <nlp_DID> */ | 1008 | /* PRLI completes to NPort <nlp_DID> */ |
1022 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 1009 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
1023 | "%d (%d):0103 PRLI completes to NPort x%x " | 1010 | "0103 PRLI completes to NPort x%x " |
1024 | "Data: x%x x%x x%x x%x\n", | 1011 | "Data: x%x x%x x%x x%x\n", |
1025 | phba->brd_no, vport->vpi, ndlp->nlp_DID, | 1012 | ndlp->nlp_DID, irsp->ulpStatus, irsp->un.ulpWord[4], |
1026 | irsp->ulpStatus, irsp->un.ulpWord[4], irsp->ulpTimeout, | 1013 | irsp->ulpTimeout, vport->num_disc_nodes); |
1027 | vport->num_disc_nodes); | ||
1028 | 1014 | ||
1029 | vport->fc_prli_sent--; | 1015 | vport->fc_prli_sent--; |
1030 | /* Check to see if link went down during discovery */ | 1016 | /* Check to see if link went down during discovery */ |
@@ -1129,18 +1115,15 @@ static void | |||
1129 | lpfc_more_adisc(struct lpfc_vport *vport) | 1115 | lpfc_more_adisc(struct lpfc_vport *vport) |
1130 | { | 1116 | { |
1131 | int sentadisc; | 1117 | int sentadisc; |
1132 | struct lpfc_hba *phba = vport->phba; | ||
1133 | 1118 | ||
1134 | if (vport->num_disc_nodes) | 1119 | if (vport->num_disc_nodes) |
1135 | vport->num_disc_nodes--; | 1120 | vport->num_disc_nodes--; |
1136 | |||
1137 | /* Continue discovery with <num_disc_nodes> ADISCs to go */ | 1121 | /* Continue discovery with <num_disc_nodes> ADISCs to go */ |
1138 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 1122 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
1139 | "%d (%d):0210 Continue discovery with %d ADISCs to go " | 1123 | "0210 Continue discovery with %d ADISCs to go " |
1140 | "Data: x%x x%x x%x\n", | 1124 | "Data: x%x x%x x%x\n", |
1141 | phba->brd_no, vport->vpi, vport->num_disc_nodes, | 1125 | vport->num_disc_nodes, vport->fc_adisc_cnt, |
1142 | vport->fc_adisc_cnt, vport->fc_flag, vport->port_state); | 1126 | vport->fc_flag, vport->port_state); |
1143 | |||
1144 | /* Check to see if there are more ADISCs to be sent */ | 1127 | /* Check to see if there are more ADISCs to be sent */ |
1145 | if (vport->fc_flag & FC_NLP_MORE) { | 1128 | if (vport->fc_flag & FC_NLP_MORE) { |
1146 | lpfc_set_disctmo(vport); | 1129 | lpfc_set_disctmo(vport); |
@@ -1206,15 +1189,12 @@ lpfc_cmpl_els_adisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1206 | disc = (ndlp->nlp_flag & NLP_NPR_2B_DISC); | 1189 | disc = (ndlp->nlp_flag & NLP_NPR_2B_DISC); |
1207 | ndlp->nlp_flag &= ~(NLP_ADISC_SND | NLP_NPR_2B_DISC); | 1190 | ndlp->nlp_flag &= ~(NLP_ADISC_SND | NLP_NPR_2B_DISC); |
1208 | spin_unlock_irq(shost->host_lock); | 1191 | spin_unlock_irq(shost->host_lock); |
1209 | |||
1210 | /* ADISC completes to NPort <nlp_DID> */ | 1192 | /* ADISC completes to NPort <nlp_DID> */ |
1211 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 1193 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
1212 | "%d (%d):0104 ADISC completes to NPort x%x " | 1194 | "0104 ADISC completes to NPort x%x " |
1213 | "Data: x%x x%x x%x x%x x%x\n", | 1195 | "Data: x%x x%x x%x x%x x%x\n", |
1214 | phba->brd_no, vport->vpi, ndlp->nlp_DID, | 1196 | ndlp->nlp_DID, irsp->ulpStatus, irsp->un.ulpWord[4], |
1215 | irsp->ulpStatus, irsp->un.ulpWord[4], irsp->ulpTimeout, | 1197 | irsp->ulpTimeout, disc, vport->num_disc_nodes); |
1216 | disc, vport->num_disc_nodes); | ||
1217 | |||
1218 | /* Check to see if link went down during discovery */ | 1198 | /* Check to see if link went down during discovery */ |
1219 | if (lpfc_els_chk_latt(vport)) { | 1199 | if (lpfc_els_chk_latt(vport)) { |
1220 | spin_lock_irq(shost->host_lock); | 1200 | spin_lock_irq(shost->host_lock); |
@@ -1374,15 +1354,12 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1374 | "LOGO cmpl: status:x%x/x%x did:x%x", | 1354 | "LOGO cmpl: status:x%x/x%x did:x%x", |
1375 | irsp->ulpStatus, irsp->un.ulpWord[4], | 1355 | irsp->ulpStatus, irsp->un.ulpWord[4], |
1376 | ndlp->nlp_DID); | 1356 | ndlp->nlp_DID); |
1377 | |||
1378 | /* LOGO completes to NPort <nlp_DID> */ | 1357 | /* LOGO completes to NPort <nlp_DID> */ |
1379 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 1358 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
1380 | "%d (%d):0105 LOGO completes to NPort x%x " | 1359 | "0105 LOGO completes to NPort x%x " |
1381 | "Data: x%x x%x x%x x%x\n", | 1360 | "Data: x%x x%x x%x x%x\n", |
1382 | phba->brd_no, vport->vpi, ndlp->nlp_DID, | 1361 | ndlp->nlp_DID, irsp->ulpStatus, irsp->un.ulpWord[4], |
1383 | irsp->ulpStatus, irsp->un.ulpWord[4], irsp->ulpTimeout, | 1362 | irsp->ulpTimeout, vport->num_disc_nodes); |
1384 | vport->num_disc_nodes); | ||
1385 | |||
1386 | /* Check to see if link went down during discovery */ | 1363 | /* Check to see if link went down during discovery */ |
1387 | if (lpfc_els_chk_latt(vport)) | 1364 | if (lpfc_els_chk_latt(vport)) |
1388 | goto out; | 1365 | goto out; |
@@ -1488,15 +1465,11 @@ lpfc_cmpl_els_cmd(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1488 | "ELS cmd cmpl: status:x%x/x%x did:x%x", | 1465 | "ELS cmd cmpl: status:x%x/x%x did:x%x", |
1489 | irsp->ulpStatus, irsp->un.ulpWord[4], | 1466 | irsp->ulpStatus, irsp->un.ulpWord[4], |
1490 | irsp->un.elsreq64.remoteID); | 1467 | irsp->un.elsreq64.remoteID); |
1491 | |||
1492 | /* ELS cmd tag <ulpIoTag> completes */ | 1468 | /* ELS cmd tag <ulpIoTag> completes */ |
1493 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 1469 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
1494 | "%d (%d):0106 ELS cmd tag x%x completes Data: x%x x%x " | 1470 | "0106 ELS cmd tag x%x completes Data: x%x x%x x%x\n", |
1495 | "x%x\n", | 1471 | irsp->ulpIoTag, irsp->ulpStatus, |
1496 | phba->brd_no, vport->vpi, | 1472 | irsp->un.ulpWord[4], irsp->ulpTimeout); |
1497 | irsp->ulpIoTag, irsp->ulpStatus, | ||
1498 | irsp->un.ulpWord[4], irsp->ulpTimeout); | ||
1499 | |||
1500 | /* Check to see if link went down during discovery */ | 1473 | /* Check to see if link went down during discovery */ |
1501 | lpfc_els_chk_latt(vport); | 1474 | lpfc_els_chk_latt(vport); |
1502 | lpfc_els_free_iocb(phba, cmdiocb); | 1475 | lpfc_els_free_iocb(phba, cmdiocb); |
@@ -1831,9 +1804,9 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1831 | case IOERR_ILLEGAL_COMMAND: | 1804 | case IOERR_ILLEGAL_COMMAND: |
1832 | if ((phba->sli3_options & LPFC_SLI3_VPORT_TEARDOWN) && | 1805 | if ((phba->sli3_options & LPFC_SLI3_VPORT_TEARDOWN) && |
1833 | (cmd == ELS_CMD_FDISC)) { | 1806 | (cmd == ELS_CMD_FDISC)) { |
1834 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 1807 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
1835 | "%d (%d):0124 FDISC failed (3/6) retrying...\n", | 1808 | "0124 FDISC failed (3/6) " |
1836 | phba->brd_no, vport->vpi); | 1809 | "retrying...\n"); |
1837 | lpfc_mbx_unreg_vpi(vport); | 1810 | lpfc_mbx_unreg_vpi(vport); |
1838 | retry = 1; | 1811 | retry = 1; |
1839 | /* Always retry for this case */ | 1812 | /* Always retry for this case */ |
@@ -1898,10 +1871,10 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1898 | if ((phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) && | 1871 | if ((phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) && |
1899 | (cmd == ELS_CMD_FDISC) && | 1872 | (cmd == ELS_CMD_FDISC) && |
1900 | (stat.un.b.lsRjtRsnCodeExp == LSEXP_OUT_OF_RESOURCE)){ | 1873 | (stat.un.b.lsRjtRsnCodeExp == LSEXP_OUT_OF_RESOURCE)){ |
1901 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 1874 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
1902 | "%d (%d):0125 FDISC Failed (x%x)." | 1875 | "0125 FDISC Failed (x%x). " |
1903 | " Fabric out of resources\n", | 1876 | "Fabric out of resources\n", |
1904 | phba->brd_no, vport->vpi, stat.un.lsRjtError); | 1877 | stat.un.lsRjtError); |
1905 | lpfc_vport_set_state(vport, | 1878 | lpfc_vport_set_state(vport, |
1906 | FC_VPORT_NO_FABRIC_RSCS); | 1879 | FC_VPORT_NO_FABRIC_RSCS); |
1907 | } | 1880 | } |
@@ -1926,10 +1899,10 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1926 | ((stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_PNAME) || | 1899 | ((stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_PNAME) || |
1927 | (stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_NPORT_ID)) | 1900 | (stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_NPORT_ID)) |
1928 | ) { | 1901 | ) { |
1929 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 1902 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
1930 | "%d (%d):0123 FDISC Failed (x%x)." | 1903 | "0123 FDISC Failed (x%x). " |
1931 | " Fabric Detected Bad WWN\n", | 1904 | "Fabric Detected Bad WWN\n", |
1932 | phba->brd_no, vport->vpi, stat.un.lsRjtError); | 1905 | stat.un.lsRjtError); |
1933 | lpfc_vport_set_state(vport, | 1906 | lpfc_vport_set_state(vport, |
1934 | FC_VPORT_FABRIC_REJ_WWN); | 1907 | FC_VPORT_FABRIC_REJ_WWN); |
1935 | } | 1908 | } |
@@ -1959,11 +1932,10 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1959 | if (retry) { | 1932 | if (retry) { |
1960 | 1933 | ||
1961 | /* Retry ELS command <elsCmd> to remote NPORT <did> */ | 1934 | /* Retry ELS command <elsCmd> to remote NPORT <did> */ |
1962 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 1935 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
1963 | "%d (%d):0107 Retry ELS command x%x to remote " | 1936 | "0107 Retry ELS command x%x to remote " |
1964 | "NPORT x%x Data: x%x x%x\n", | 1937 | "NPORT x%x Data: x%x x%x\n", |
1965 | phba->brd_no, vport->vpi, | 1938 | cmd, did, cmdiocb->retry, delay); |
1966 | cmd, did, cmdiocb->retry, delay); | ||
1967 | 1939 | ||
1968 | if (((cmd == ELS_CMD_PLOGI) || (cmd == ELS_CMD_ADISC)) && | 1940 | if (((cmd == ELS_CMD_PLOGI) || (cmd == ELS_CMD_ADISC)) && |
1969 | ((irsp->ulpStatus != IOSTAT_LOCAL_REJECT) || | 1941 | ((irsp->ulpStatus != IOSTAT_LOCAL_REJECT) || |
@@ -2031,7 +2003,6 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
2031 | return 1; | 2003 | return 1; |
2032 | } | 2004 | } |
2033 | } | 2005 | } |
2034 | |||
2035 | /* No retry ELS command <elsCmd> to remote NPORT <did> */ | 2006 | /* No retry ELS command <elsCmd> to remote NPORT <did> */ |
2036 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 2007 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
2037 | "0108 No retry ELS command x%x to remote " | 2008 | "0108 No retry ELS command x%x to remote " |
@@ -2086,14 +2057,12 @@ lpfc_cmpl_els_logo_acc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
2086 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP, | 2057 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP, |
2087 | "ACC LOGO cmpl: status:x%x/x%x did:x%x", | 2058 | "ACC LOGO cmpl: status:x%x/x%x did:x%x", |
2088 | irsp->ulpStatus, irsp->un.ulpWord[4], ndlp->nlp_DID); | 2059 | irsp->ulpStatus, irsp->un.ulpWord[4], ndlp->nlp_DID); |
2089 | |||
2090 | /* ACC to LOGO completes to NPort <nlp_DID> */ | 2060 | /* ACC to LOGO completes to NPort <nlp_DID> */ |
2091 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2061 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2092 | "%d (%d):0109 ACC to LOGO completes to NPort x%x " | 2062 | "0109 ACC to LOGO completes to NPort x%x " |
2093 | "Data: x%x x%x x%x\n", | 2063 | "Data: x%x x%x x%x\n", |
2094 | phba->brd_no, vport->vpi, ndlp->nlp_DID, | 2064 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
2095 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 2065 | ndlp->nlp_rpi); |
2096 | |||
2097 | switch (ndlp->nlp_state) { | 2066 | switch (ndlp->nlp_state) { |
2098 | case NLP_STE_UNUSED_NODE: /* node is just allocated */ | 2067 | case NLP_STE_UNUSED_NODE: /* node is just allocated */ |
2099 | lpfc_drop_node(vport, ndlp); | 2068 | lpfc_drop_node(vport, ndlp); |
@@ -2155,17 +2124,14 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
2155 | "ACC cmpl: status:x%x/x%x did:x%x", | 2124 | "ACC cmpl: status:x%x/x%x did:x%x", |
2156 | irsp->ulpStatus, irsp->un.ulpWord[4], | 2125 | irsp->ulpStatus, irsp->un.ulpWord[4], |
2157 | irsp->un.rcvels.remoteID); | 2126 | irsp->un.rcvels.remoteID); |
2158 | |||
2159 | /* ELS response tag <ulpIoTag> completes */ | 2127 | /* ELS response tag <ulpIoTag> completes */ |
2160 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2128 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2161 | "%d (%d):0110 ELS response tag x%x completes " | 2129 | "0110 ELS response tag x%x completes " |
2162 | "Data: x%x x%x x%x x%x x%x x%x x%x\n", | 2130 | "Data: x%x x%x x%x x%x x%x x%x x%x\n", |
2163 | phba->brd_no, vport->vpi, | 2131 | cmdiocb->iocb.ulpIoTag, rspiocb->iocb.ulpStatus, |
2164 | cmdiocb->iocb.ulpIoTag, rspiocb->iocb.ulpStatus, | 2132 | rspiocb->iocb.un.ulpWord[4], rspiocb->iocb.ulpTimeout, |
2165 | rspiocb->iocb.un.ulpWord[4], rspiocb->iocb.ulpTimeout, | 2133 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
2166 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, | 2134 | ndlp->nlp_rpi); |
2167 | ndlp->nlp_rpi); | ||
2168 | |||
2169 | if (mbox) { | 2135 | if (mbox) { |
2170 | if ((rspiocb->iocb.ulpStatus == 0) | 2136 | if ((rspiocb->iocb.ulpStatus == 0) |
2171 | && (ndlp->nlp_flag & NLP_ACC_REGLOGIN)) { | 2137 | && (ndlp->nlp_flag & NLP_ACC_REGLOGIN)) { |
@@ -2309,15 +2275,13 @@ lpfc_els_rsp_acc(struct lpfc_vport *vport, uint32_t flag, | |||
2309 | lpfc_nlp_put(ndlp); | 2275 | lpfc_nlp_put(ndlp); |
2310 | elsiocb->context1 = NULL; | 2276 | elsiocb->context1 = NULL; |
2311 | } | 2277 | } |
2312 | |||
2313 | /* Xmit ELS ACC response tag <ulpIoTag> */ | 2278 | /* Xmit ELS ACC response tag <ulpIoTag> */ |
2314 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2279 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2315 | "%d (%d):0128 Xmit ELS ACC response tag x%x, XRI: x%x, " | 2280 | "0128 Xmit ELS ACC response tag x%x, XRI: x%x, " |
2316 | "DID: x%x, nlp_flag: x%x nlp_state: x%x RPI: x%x\n", | 2281 | "DID: x%x, nlp_flag: x%x nlp_state: x%x RPI: x%x\n", |
2317 | phba->brd_no, vport->vpi, elsiocb->iotag, | 2282 | elsiocb->iotag, elsiocb->iocb.ulpContext, |
2318 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, | 2283 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
2319 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 2284 | ndlp->nlp_rpi); |
2320 | |||
2321 | if (ndlp->nlp_flag & NLP_LOGO_ACC) { | 2285 | if (ndlp->nlp_flag & NLP_LOGO_ACC) { |
2322 | spin_lock_irq(shost->host_lock); | 2286 | spin_lock_irq(shost->host_lock); |
2323 | ndlp->nlp_flag &= ~NLP_LOGO_ACC; | 2287 | ndlp->nlp_flag &= ~NLP_LOGO_ACC; |
@@ -2375,14 +2339,13 @@ lpfc_els_rsp_reject(struct lpfc_vport *vport, uint32_t rejectError, | |||
2375 | } | 2339 | } |
2376 | 2340 | ||
2377 | /* Xmit ELS RJT <err> response tag <ulpIoTag> */ | 2341 | /* Xmit ELS RJT <err> response tag <ulpIoTag> */ |
2378 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2342 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2379 | "%d (%d):0129 Xmit ELS RJT x%x response tag x%x " | 2343 | "0129 Xmit ELS RJT x%x response tag x%x " |
2380 | "xri x%x, did x%x, nlp_flag x%x, nlp_state x%x, " | 2344 | "xri x%x, did x%x, nlp_flag x%x, nlp_state x%x, " |
2381 | "rpi x%x\n", | 2345 | "rpi x%x\n", |
2382 | phba->brd_no, vport->vpi, rejectError, elsiocb->iotag, | 2346 | rejectError, elsiocb->iotag, |
2383 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, | 2347 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, |
2384 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 2348 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); |
2385 | |||
2386 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP, | 2349 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP, |
2387 | "Issue LS_RJT: did:x%x flg:x%x err:x%x", | 2350 | "Issue LS_RJT: did:x%x flg:x%x err:x%x", |
2388 | ndlp->nlp_DID, ndlp->nlp_flag, rejectError); | 2351 | ndlp->nlp_DID, ndlp->nlp_flag, rejectError); |
@@ -2422,13 +2385,12 @@ lpfc_els_rsp_adisc_acc(struct lpfc_vport *vport, struct lpfc_iocbq *oldiocb, | |||
2422 | icmd->ulpContext = oldcmd->ulpContext; /* Xri */ | 2385 | icmd->ulpContext = oldcmd->ulpContext; /* Xri */ |
2423 | 2386 | ||
2424 | /* Xmit ADISC ACC response tag <ulpIoTag> */ | 2387 | /* Xmit ADISC ACC response tag <ulpIoTag> */ |
2425 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2388 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2426 | "%d (%d):0130 Xmit ADISC ACC response iotag x%x xri: " | 2389 | "0130 Xmit ADISC ACC response iotag x%x xri: " |
2427 | "x%x, did x%x, nlp_flag x%x, nlp_state x%x rpi x%x\n", | 2390 | "x%x, did x%x, nlp_flag x%x, nlp_state x%x rpi x%x\n", |
2428 | phba->brd_no, vport->vpi, elsiocb->iotag, | 2391 | elsiocb->iotag, elsiocb->iocb.ulpContext, |
2429 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, | 2392 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
2430 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 2393 | ndlp->nlp_rpi); |
2431 | |||
2432 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); | 2394 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); |
2433 | 2395 | ||
2434 | *((uint32_t *) (pcmd)) = ELS_CMD_ACC; | 2396 | *((uint32_t *) (pcmd)) = ELS_CMD_ACC; |
@@ -2482,15 +2444,13 @@ lpfc_els_rsp_prli_acc(struct lpfc_vport *vport, struct lpfc_iocbq *oldiocb, | |||
2482 | icmd = &elsiocb->iocb; | 2444 | icmd = &elsiocb->iocb; |
2483 | oldcmd = &oldiocb->iocb; | 2445 | oldcmd = &oldiocb->iocb; |
2484 | icmd->ulpContext = oldcmd->ulpContext; /* Xri */ | 2446 | icmd->ulpContext = oldcmd->ulpContext; /* Xri */ |
2485 | |||
2486 | /* Xmit PRLI ACC response tag <ulpIoTag> */ | 2447 | /* Xmit PRLI ACC response tag <ulpIoTag> */ |
2487 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2448 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2488 | "%d (%d):0131 Xmit PRLI ACC response tag x%x xri x%x, " | 2449 | "0131 Xmit PRLI ACC response tag x%x xri x%x, " |
2489 | "did x%x, nlp_flag x%x, nlp_state x%x, rpi x%x\n", | 2450 | "did x%x, nlp_flag x%x, nlp_state x%x, rpi x%x\n", |
2490 | phba->brd_no, vport->vpi, elsiocb->iotag, | 2451 | elsiocb->iotag, elsiocb->iocb.ulpContext, |
2491 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, | 2452 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
2492 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 2453 | ndlp->nlp_rpi); |
2493 | |||
2494 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); | 2454 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); |
2495 | 2455 | ||
2496 | *((uint32_t *) (pcmd)) = (ELS_CMD_ACC | (ELS_CMD_PRLI & ~ELS_RSP_MASK)); | 2456 | *((uint32_t *) (pcmd)) = (ELS_CMD_ACC | (ELS_CMD_PRLI & ~ELS_RSP_MASK)); |
@@ -2564,16 +2524,11 @@ lpfc_els_rsp_rnid_acc(struct lpfc_vport *vport, uint8_t format, | |||
2564 | icmd = &elsiocb->iocb; | 2524 | icmd = &elsiocb->iocb; |
2565 | oldcmd = &oldiocb->iocb; | 2525 | oldcmd = &oldiocb->iocb; |
2566 | icmd->ulpContext = oldcmd->ulpContext; /* Xri */ | 2526 | icmd->ulpContext = oldcmd->ulpContext; /* Xri */ |
2567 | |||
2568 | /* Xmit RNID ACC response tag <ulpIoTag> */ | 2527 | /* Xmit RNID ACC response tag <ulpIoTag> */ |
2569 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2528 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2570 | "%d (%d):0132 Xmit RNID ACC response tag x%x " | 2529 | "0132 Xmit RNID ACC response tag x%x xri x%x\n", |
2571 | "xri x%x\n", | 2530 | elsiocb->iotag, elsiocb->iocb.ulpContext); |
2572 | phba->brd_no, vport->vpi, elsiocb->iotag, | ||
2573 | elsiocb->iocb.ulpContext); | ||
2574 | |||
2575 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); | 2531 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); |
2576 | |||
2577 | *((uint32_t *) (pcmd)) = ELS_CMD_ACC; | 2532 | *((uint32_t *) (pcmd)) = ELS_CMD_ACC; |
2578 | pcmd += sizeof(uint32_t); | 2533 | pcmd += sizeof(uint32_t); |
2579 | 2534 | ||
@@ -2716,7 +2671,6 @@ lpfc_rscn_payload_check(struct lpfc_vport *vport, uint32_t did) | |||
2716 | D_ID rscn_did; | 2671 | D_ID rscn_did; |
2717 | uint32_t *lp; | 2672 | uint32_t *lp; |
2718 | uint32_t payload_len, i; | 2673 | uint32_t payload_len, i; |
2719 | struct lpfc_hba *phba = vport->phba; | ||
2720 | 2674 | ||
2721 | ns_did.un.word = did; | 2675 | ns_did.un.word = did; |
2722 | 2676 | ||
@@ -2751,12 +2705,10 @@ lpfc_rscn_payload_check(struct lpfc_vport *vport, uint32_t did) | |||
2751 | break; | 2705 | break; |
2752 | default: | 2706 | default: |
2753 | /* Unknown Identifier in RSCN node */ | 2707 | /* Unknown Identifier in RSCN node */ |
2754 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 2708 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
2755 | "%d (%d):0217 Unknown " | 2709 | "0217 Unknown Identifier in " |
2756 | "Identifier in RSCN payload " | 2710 | "RSCN payload Data: x%x\n", |
2757 | "Data: x%x\n", | 2711 | rscn_did.un.word); |
2758 | phba->brd_no, vport->vpi, | ||
2759 | rscn_did.un.word); | ||
2760 | case 3: /* Whole Fabric effected */ | 2712 | case 3: /* Whole Fabric effected */ |
2761 | return did; | 2713 | return did; |
2762 | } | 2714 | } |
@@ -2813,13 +2765,10 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
2813 | 2765 | ||
2814 | payload_len = be32_to_cpu(*lp++ & ~ELS_CMD_MASK); | 2766 | payload_len = be32_to_cpu(*lp++ & ~ELS_CMD_MASK); |
2815 | payload_len -= sizeof(uint32_t); /* take off word 0 */ | 2767 | payload_len -= sizeof(uint32_t); /* take off word 0 */ |
2816 | |||
2817 | /* RSCN received */ | 2768 | /* RSCN received */ |
2818 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2769 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2819 | "%d (%d):0214 RSCN received Data: x%x x%x x%x x%x\n", | 2770 | "0214 RSCN received Data: x%x x%x x%x x%x\n", |
2820 | phba->brd_no, vport->vpi, vport->fc_flag, payload_len, | 2771 | vport->fc_flag, payload_len, *lp, rscn_cnt); |
2821 | *lp, rscn_cnt); | ||
2822 | |||
2823 | for (i = 0; i < payload_len/sizeof(uint32_t); i++) | 2772 | for (i = 0; i < payload_len/sizeof(uint32_t); i++) |
2824 | fc_host_post_event(shost, fc_get_event_number(), | 2773 | fc_host_post_event(shost, fc_get_event_number(), |
2825 | FCH_EVT_RSCN, lp[i]); | 2774 | FCH_EVT_RSCN, lp[i]); |
@@ -2854,11 +2803,11 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
2854 | } | 2803 | } |
2855 | if (rscn_id == hba_id) { | 2804 | if (rscn_id == hba_id) { |
2856 | /* ALL NPortIDs in RSCN are on HBA */ | 2805 | /* ALL NPortIDs in RSCN are on HBA */ |
2857 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2806 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2858 | "%d (%d):0214 Ignore RSCN Data: x%x x%x x%x x%x\n", | 2807 | "0214 Ignore RSCN " |
2859 | phba->brd_no, vport->vpi, vport->fc_flag, payload_len, | 2808 | "Data: x%x x%x x%x x%x\n", |
2860 | *lp, rscn_cnt); | 2809 | vport->fc_flag, payload_len, |
2861 | 2810 | *lp, rscn_cnt); | |
2862 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, | 2811 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, |
2863 | "RCV RSCN vport: did:x%x/ste:x%x flg:x%x", | 2812 | "RCV RSCN vport: did:x%x/ste:x%x flg:x%x", |
2864 | ndlp->nlp_DID, vport->port_state, | 2813 | ndlp->nlp_DID, vport->port_state, |
@@ -2904,23 +2853,21 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
2904 | } | 2853 | } |
2905 | 2854 | ||
2906 | /* Deferred RSCN */ | 2855 | /* Deferred RSCN */ |
2907 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2856 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2908 | "%d (%d):0235 Deferred RSCN " | 2857 | "0235 Deferred RSCN " |
2909 | "Data: x%x x%x x%x\n", | 2858 | "Data: x%x x%x x%x\n", |
2910 | phba->brd_no, vport->vpi, | 2859 | vport->fc_rscn_id_cnt, vport->fc_flag, |
2911 | vport->fc_rscn_id_cnt, vport->fc_flag, | 2860 | vport->port_state); |
2912 | vport->port_state); | ||
2913 | } else { | 2861 | } else { |
2914 | spin_lock_irq(shost->host_lock); | 2862 | spin_lock_irq(shost->host_lock); |
2915 | vport->fc_flag |= FC_RSCN_DISCOVERY; | 2863 | vport->fc_flag |= FC_RSCN_DISCOVERY; |
2916 | spin_unlock_irq(shost->host_lock); | 2864 | spin_unlock_irq(shost->host_lock); |
2917 | /* ReDiscovery RSCN */ | 2865 | /* ReDiscovery RSCN */ |
2918 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2866 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2919 | "%d (%d):0234 ReDiscovery RSCN " | 2867 | "0234 ReDiscovery RSCN " |
2920 | "Data: x%x x%x x%x\n", | 2868 | "Data: x%x x%x x%x\n", |
2921 | phba->brd_no, vport->vpi, | 2869 | vport->fc_rscn_id_cnt, vport->fc_flag, |
2922 | vport->fc_rscn_id_cnt, vport->fc_flag, | 2870 | vport->port_state); |
2923 | vport->port_state); | ||
2924 | } | 2871 | } |
2925 | /* Send back ACC */ | 2872 | /* Send back ACC */ |
2926 | lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL, | 2873 | lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL, |
@@ -2973,11 +2920,10 @@ lpfc_els_handle_rscn(struct lpfc_vport *vport) | |||
2973 | lpfc_set_disctmo(vport); | 2920 | lpfc_set_disctmo(vport); |
2974 | 2921 | ||
2975 | /* RSCN processed */ | 2922 | /* RSCN processed */ |
2976 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2923 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2977 | "%d (%d):0215 RSCN processed Data: x%x x%x x%x x%x\n", | 2924 | "0215 RSCN processed Data: x%x x%x x%x x%x\n", |
2978 | phba->brd_no, vport->vpi, | 2925 | vport->fc_flag, 0, vport->fc_rscn_id_cnt, |
2979 | vport->fc_flag, 0, vport->fc_rscn_id_cnt, | 2926 | vport->port_state); |
2980 | vport->port_state); | ||
2981 | 2927 | ||
2982 | /* To process RSCN, first compare RSCN data with NameServer */ | 2928 | /* To process RSCN, first compare RSCN data with NameServer */ |
2983 | vport->fc_ns_retry = 0; | 2929 | vport->fc_ns_retry = 0; |
@@ -3045,10 +2991,10 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
3045 | 2991 | ||
3046 | /* An FLOGI ELS command <elsCmd> was received from DID <did> in | 2992 | /* An FLOGI ELS command <elsCmd> was received from DID <did> in |
3047 | Loop Mode */ | 2993 | Loop Mode */ |
3048 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 2994 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
3049 | "%d (%d):0113 An FLOGI ELS command x%x was " | 2995 | "0113 An FLOGI ELS command x%x was " |
3050 | "received from DID x%x in Loop Mode\n", | 2996 | "received from DID x%x in Loop Mode\n", |
3051 | phba->brd_no, vport->vpi, cmd, did); | 2997 | cmd, did); |
3052 | return 1; | 2998 | return 1; |
3053 | } | 2999 | } |
3054 | 3000 | ||
@@ -3219,16 +3165,13 @@ lpfc_els_rsp_rps_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
3219 | rps_rsp->primSeqErrCnt = be32_to_cpu(mb->un.varRdLnk.primSeqErrCnt); | 3165 | rps_rsp->primSeqErrCnt = be32_to_cpu(mb->un.varRdLnk.primSeqErrCnt); |
3220 | rps_rsp->invalidXmitWord = be32_to_cpu(mb->un.varRdLnk.invalidXmitWord); | 3166 | rps_rsp->invalidXmitWord = be32_to_cpu(mb->un.varRdLnk.invalidXmitWord); |
3221 | rps_rsp->crcCnt = be32_to_cpu(mb->un.varRdLnk.crcCnt); | 3167 | rps_rsp->crcCnt = be32_to_cpu(mb->un.varRdLnk.crcCnt); |
3222 | |||
3223 | /* Xmit ELS RPS ACC response tag <ulpIoTag> */ | 3168 | /* Xmit ELS RPS ACC response tag <ulpIoTag> */ |
3224 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3169 | lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_ELS, |
3225 | "%d (%d):0118 Xmit ELS RPS ACC response tag x%x " | 3170 | "0118 Xmit ELS RPS ACC response tag x%x xri x%x, " |
3226 | "xri x%x, did x%x, nlp_flag x%x, nlp_state x%x, " | 3171 | "did x%x, nlp_flag x%x, nlp_state x%x, rpi x%x\n", |
3227 | "rpi x%x\n", | 3172 | elsiocb->iotag, elsiocb->iocb.ulpContext, |
3228 | phba->brd_no, ndlp->vport->vpi, elsiocb->iotag, | 3173 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
3229 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, | 3174 | ndlp->nlp_rpi); |
3230 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | ||
3231 | |||
3232 | elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; | 3175 | elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; |
3233 | phba->fc_stat.elsXmitACC++; | 3176 | phba->fc_stat.elsXmitACC++; |
3234 | if (lpfc_sli_issue_iocb(phba, pring, elsiocb, 0) == IOCB_ERROR) | 3177 | if (lpfc_sli_issue_iocb(phba, pring, elsiocb, 0) == IOCB_ERROR) |
@@ -3330,21 +3273,16 @@ lpfc_els_rsp_rpl_acc(struct lpfc_vport *vport, uint16_t cmdsize, | |||
3330 | rpl_rsp.port_num_blk.portID = be32_to_cpu(vport->fc_myDID); | 3273 | rpl_rsp.port_num_blk.portID = be32_to_cpu(vport->fc_myDID); |
3331 | memcpy(&rpl_rsp.port_num_blk.portName, &vport->fc_portname, | 3274 | memcpy(&rpl_rsp.port_num_blk.portName, &vport->fc_portname, |
3332 | sizeof(struct lpfc_name)); | 3275 | sizeof(struct lpfc_name)); |
3333 | |||
3334 | memcpy(pcmd, &rpl_rsp, cmdsize - sizeof(uint32_t)); | 3276 | memcpy(pcmd, &rpl_rsp, cmdsize - sizeof(uint32_t)); |
3335 | |||
3336 | |||
3337 | /* Xmit ELS RPL ACC response tag <ulpIoTag> */ | 3277 | /* Xmit ELS RPL ACC response tag <ulpIoTag> */ |
3338 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3278 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
3339 | "%d (%d):0120 Xmit ELS RPL ACC response tag x%x " | 3279 | "0120 Xmit ELS RPL ACC response tag x%x " |
3340 | "xri x%x, did x%x, nlp_flag x%x, nlp_state x%x, " | 3280 | "xri x%x, did x%x, nlp_flag x%x, nlp_state x%x, " |
3341 | "rpi x%x\n", | 3281 | "rpi x%x\n", |
3342 | phba->brd_no, vport->vpi, elsiocb->iotag, | 3282 | elsiocb->iotag, elsiocb->iocb.ulpContext, |
3343 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, | 3283 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
3344 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 3284 | ndlp->nlp_rpi); |
3345 | |||
3346 | elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; | 3285 | elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; |
3347 | |||
3348 | phba->fc_stat.elsXmitACC++; | 3286 | phba->fc_stat.elsXmitACC++; |
3349 | if (lpfc_sli_issue_iocb(phba, pring, elsiocb, 0) == IOCB_ERROR) { | 3287 | if (lpfc_sli_issue_iocb(phba, pring, elsiocb, 0) == IOCB_ERROR) { |
3350 | lpfc_els_free_iocb(phba, elsiocb); | 3288 | lpfc_els_free_iocb(phba, elsiocb); |
@@ -3397,7 +3335,6 @@ static int | |||
3397 | lpfc_els_rcv_farp(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | 3335 | lpfc_els_rcv_farp(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, |
3398 | struct lpfc_nodelist *ndlp) | 3336 | struct lpfc_nodelist *ndlp) |
3399 | { | 3337 | { |
3400 | struct lpfc_hba *phba = vport->phba; | ||
3401 | struct lpfc_dmabuf *pcmd; | 3338 | struct lpfc_dmabuf *pcmd; |
3402 | uint32_t *lp; | 3339 | uint32_t *lp; |
3403 | IOCB_t *icmd; | 3340 | IOCB_t *icmd; |
@@ -3411,12 +3348,9 @@ lpfc_els_rcv_farp(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
3411 | 3348 | ||
3412 | cmd = *lp++; | 3349 | cmd = *lp++; |
3413 | fp = (FARP *) lp; | 3350 | fp = (FARP *) lp; |
3414 | |||
3415 | /* FARP-REQ received from DID <did> */ | 3351 | /* FARP-REQ received from DID <did> */ |
3416 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3352 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
3417 | "%d (%d):0601 FARP-REQ received from DID x%x\n", | 3353 | "0601 FARP-REQ received from DID x%x\n", did); |
3418 | phba->brd_no, vport->vpi, did); | ||
3419 | |||
3420 | /* We will only support match on WWPN or WWNN */ | 3354 | /* We will only support match on WWPN or WWNN */ |
3421 | if (fp->Mflags & ~(FARP_MATCH_NODE | FARP_MATCH_PORT)) { | 3355 | if (fp->Mflags & ~(FARP_MATCH_NODE | FARP_MATCH_PORT)) { |
3422 | return 0; | 3356 | return 0; |
@@ -3464,7 +3398,6 @@ lpfc_els_rcv_farpr(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
3464 | uint32_t *lp; | 3398 | uint32_t *lp; |
3465 | IOCB_t *icmd; | 3399 | IOCB_t *icmd; |
3466 | uint32_t cmd, did; | 3400 | uint32_t cmd, did; |
3467 | struct lpfc_hba *phba = vport->phba; | ||
3468 | 3401 | ||
3469 | icmd = &cmdiocb->iocb; | 3402 | icmd = &cmdiocb->iocb; |
3470 | did = icmd->un.elsreq64.remoteID; | 3403 | did = icmd->un.elsreq64.remoteID; |
@@ -3473,9 +3406,8 @@ lpfc_els_rcv_farpr(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
3473 | 3406 | ||
3474 | cmd = *lp++; | 3407 | cmd = *lp++; |
3475 | /* FARP-RSP received from DID <did> */ | 3408 | /* FARP-RSP received from DID <did> */ |
3476 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3409 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
3477 | "%d (%d):0600 FARP-RSP received from DID x%x\n", | 3410 | "0600 FARP-RSP received from DID x%x\n", did); |
3478 | phba->brd_no, vport->vpi, did); | ||
3479 | /* ACCEPT the Farp resp request */ | 3411 | /* ACCEPT the Farp resp request */ |
3480 | lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL, 0); | 3412 | lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL, 0); |
3481 | 3413 | ||
@@ -3495,10 +3427,8 @@ lpfc_els_rcv_fan(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
3495 | struct lpfc_hba *phba = vport->phba; | 3427 | struct lpfc_hba *phba = vport->phba; |
3496 | 3428 | ||
3497 | /* FAN received */ | 3429 | /* FAN received */ |
3498 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3430 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
3499 | "%d (%d):0265 FAN received\n", | 3431 | "0265 FAN received\n"); |
3500 | phba->brd_no, vport->vpi); | ||
3501 | |||
3502 | icmd = &cmdiocb->iocb; | 3432 | icmd = &cmdiocb->iocb; |
3503 | did = icmd->un.elsreq64.remoteID; | 3433 | did = icmd->un.elsreq64.remoteID; |
3504 | pcmd = (struct lpfc_dmabuf *)cmdiocb->context2; | 3434 | pcmd = (struct lpfc_dmabuf *)cmdiocb->context2; |
@@ -3657,13 +3587,10 @@ lpfc_els_timeout_handler(struct lpfc_vport *vport) | |||
3657 | if (ndlp) | 3587 | if (ndlp) |
3658 | remote_ID = ndlp->nlp_DID; | 3588 | remote_ID = ndlp->nlp_DID; |
3659 | } | 3589 | } |
3660 | 3590 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | |
3661 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 3591 | "0127 ELS timeout Data: x%x x%x x%x " |
3662 | "%d (%d):0127 ELS timeout Data: x%x x%x x%x " | 3592 | "x%x\n", els_command, |
3663 | "x%x\n", | 3593 | remote_ID, cmd->ulpCommand, cmd->ulpIoTag); |
3664 | phba->brd_no, vport->vpi, els_command, | ||
3665 | remote_ID, cmd->ulpCommand, cmd->ulpIoTag); | ||
3666 | |||
3667 | lpfc_sli_issue_abort_iotag(phba, pring, piocb); | 3594 | lpfc_sli_issue_abort_iotag(phba, pring, piocb); |
3668 | } | 3595 | } |
3669 | spin_unlock_irq(&phba->hbalock); | 3596 | spin_unlock_irq(&phba->hbalock); |
@@ -3838,11 +3765,9 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
3838 | cmd &= ELS_CMD_MASK; | 3765 | cmd &= ELS_CMD_MASK; |
3839 | } | 3766 | } |
3840 | /* ELS command <elsCmd> received from NPORT <did> */ | 3767 | /* ELS command <elsCmd> received from NPORT <did> */ |
3841 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3768 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
3842 | "%d (%d):0112 ELS command x%x received from NPORT x%x " | 3769 | "0112 ELS command x%x received from NPORT x%x " |
3843 | "Data: x%x\n", phba->brd_no, vport->vpi, cmd, did, | 3770 | "Data: x%x\n", cmd, did, vport->port_state); |
3844 | vport->port_state); | ||
3845 | |||
3846 | switch (cmd) { | 3771 | switch (cmd) { |
3847 | case ELS_CMD_PLOGI: | 3772 | case ELS_CMD_PLOGI: |
3848 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, | 3773 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, |
@@ -4011,10 +3936,9 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
4011 | rjt_err = LSRJT_INVALID_CMD; | 3936 | rjt_err = LSRJT_INVALID_CMD; |
4012 | 3937 | ||
4013 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ | 3938 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ |
4014 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 3939 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
4015 | "%d (%d):0115 Unknown ELS command x%x " | 3940 | "0115 Unknown ELS command x%x " |
4016 | "received from NPORT x%x\n", | 3941 | "received from NPORT x%x\n", cmd, did); |
4017 | phba->brd_no, vport->vpi, cmd, did); | ||
4018 | if (newnode) | 3942 | if (newnode) |
4019 | lpfc_drop_node(vport, ndlp); | 3943 | lpfc_drop_node(vport, ndlp); |
4020 | break; | 3944 | break; |
@@ -4035,11 +3959,10 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
4035 | 3959 | ||
4036 | dropit: | 3960 | dropit: |
4037 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 3961 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, |
4038 | "%d (%d):0111 Dropping received ELS cmd " | 3962 | "(%d):0111 Dropping received ELS cmd " |
4039 | "Data: x%x x%x x%x\n", | 3963 | "Data: x%x x%x x%x\n", |
4040 | phba->brd_no, vport ? vport->vpi : 0xffff, | 3964 | vport ? vport->vpi : 0xffff, icmd->ulpStatus, |
4041 | icmd->ulpStatus, icmd->un.ulpWord[4], | 3965 | icmd->un.ulpWord[4], icmd->ulpTimeout); |
4042 | icmd->ulpTimeout); | ||
4043 | phba->fc_stat.elsRcvDrop++; | 3966 | phba->fc_stat.elsRcvDrop++; |
4044 | } | 3967 | } |
4045 | 3968 | ||
@@ -4151,9 +4074,8 @@ lpfc_do_scr_ns_plogi(struct lpfc_hba *phba, struct lpfc_vport *vport) | |||
4151 | return; | 4074 | return; |
4152 | } | 4075 | } |
4153 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4076 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4154 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 4077 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
4155 | "%d (%d):0251 NameServer login: no memory\n", | 4078 | "0251 NameServer login: no memory\n"); |
4156 | phba->brd_no, vport->vpi); | ||
4157 | return; | 4079 | return; |
4158 | } | 4080 | } |
4159 | lpfc_nlp_init(vport, ndlp, NameServer_DID); | 4081 | lpfc_nlp_init(vport, ndlp, NameServer_DID); |
@@ -4164,9 +4086,8 @@ lpfc_do_scr_ns_plogi(struct lpfc_hba *phba, struct lpfc_vport *vport) | |||
4164 | 4086 | ||
4165 | if (lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0)) { | 4087 | if (lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0)) { |
4166 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4088 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4167 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 4089 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
4168 | "%d (%d):0252 Cannot issue NameServer login\n", | 4090 | "0252 Cannot issue NameServer login\n"); |
4169 | phba->brd_no, vport->vpi); | ||
4170 | return; | 4091 | return; |
4171 | } | 4092 | } |
4172 | 4093 | ||
@@ -4197,9 +4118,9 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
4197 | lpfc_nlp_put(ndlp); | 4118 | lpfc_nlp_put(ndlp); |
4198 | 4119 | ||
4199 | if (mb->mbxStatus) { | 4120 | if (mb->mbxStatus) { |
4200 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 4121 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, |
4201 | "%d (%d):0915 Register VPI failed: 0x%x\n", | 4122 | "0915 Register VPI failed: 0x%x\n", |
4202 | phba->brd_no, vport->vpi, mb->mbxStatus); | 4123 | mb->mbxStatus); |
4203 | 4124 | ||
4204 | switch (mb->mbxStatus) { | 4125 | switch (mb->mbxStatus) { |
4205 | case 0x11: /* unsupported feature */ | 4126 | case 0x11: /* unsupported feature */ |
@@ -4248,17 +4169,14 @@ lpfc_register_new_vport(struct lpfc_hba *phba, struct lpfc_vport *vport, | |||
4248 | vport->fc_flag &= ~FC_VPORT_NEEDS_REG_VPI; | 4169 | vport->fc_flag &= ~FC_VPORT_NEEDS_REG_VPI; |
4249 | 4170 | ||
4250 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4171 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4251 | 4172 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | |
4252 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 4173 | "0253 Register VPI: Can't send mbox\n"); |
4253 | "%d (%d):0253 Register VPI: Cannot send mbox\n", | ||
4254 | phba->brd_no, vport->vpi); | ||
4255 | } | 4174 | } |
4256 | } else { | 4175 | } else { |
4257 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4176 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4258 | 4177 | ||
4259 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 4178 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, |
4260 | "%d (%d):0254 Register VPI: no memory\n", | 4179 | "0254 Register VPI: no memory\n"); |
4261 | phba->brd_no, vport->vpi); | ||
4262 | 4180 | ||
4263 | vport->fc_flag &= ~FC_VPORT_NEEDS_REG_VPI; | 4181 | vport->fc_flag &= ~FC_VPORT_NEEDS_REG_VPI; |
4264 | lpfc_nlp_put(ndlp); | 4182 | lpfc_nlp_put(ndlp); |
@@ -4277,11 +4195,10 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
4277 | IOCB_t *irsp = &rspiocb->iocb; | 4195 | IOCB_t *irsp = &rspiocb->iocb; |
4278 | struct lpfc_iocbq *piocb; | 4196 | struct lpfc_iocbq *piocb; |
4279 | 4197 | ||
4280 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 4198 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
4281 | "%d (%d):0123 FDISC completes. x%x/x%x prevDID: x%x\n", | 4199 | "0123 FDISC completes. x%x/x%x prevDID: x%x\n", |
4282 | phba->brd_no, vport->vpi, | 4200 | irsp->ulpStatus, irsp->un.ulpWord[4], |
4283 | irsp->ulpStatus, irsp->un.ulpWord[4], vport->fc_prevDID); | 4201 | vport->fc_prevDID); |
4284 | |||
4285 | /* Since all FDISCs are being single threaded, we | 4202 | /* Since all FDISCs are being single threaded, we |
4286 | * must reset the discovery timer for ALL vports | 4203 | * must reset the discovery timer for ALL vports |
4287 | * waiting to send FDISC when one completes. | 4204 | * waiting to send FDISC when one completes. |
@@ -4298,13 +4215,10 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
4298 | /* Check for retry */ | 4215 | /* Check for retry */ |
4299 | if (lpfc_els_retry(phba, cmdiocb, rspiocb)) | 4216 | if (lpfc_els_retry(phba, cmdiocb, rspiocb)) |
4300 | goto out; | 4217 | goto out; |
4301 | |||
4302 | /* FDISC failed */ | 4218 | /* FDISC failed */ |
4303 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 4219 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
4304 | "%d (%d):0124 FDISC failed. (%d/%d)\n", | 4220 | "0124 FDISC failed. (%d/%d)\n", |
4305 | phba->brd_no, vport->vpi, | 4221 | irsp->ulpStatus, irsp->un.ulpWord[4]); |
4306 | irsp->ulpStatus, irsp->un.ulpWord[4]); | ||
4307 | |||
4308 | if (vport->fc_vport->vport_state == FC_VPORT_INITIALIZING) | 4222 | if (vport->fc_vport->vport_state == FC_VPORT_INITIALIZING) |
4309 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4223 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4310 | 4224 | ||
@@ -4370,10 +4284,8 @@ lpfc_issue_els_fdisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
4370 | ELS_CMD_FDISC); | 4284 | ELS_CMD_FDISC); |
4371 | if (!elsiocb) { | 4285 | if (!elsiocb) { |
4372 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4286 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4373 | 4287 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | |
4374 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 4288 | "0255 Issue FDISC: no IOCB\n"); |
4375 | "%d (%d):0255 Issue FDISC: no IOCB\n", | ||
4376 | phba->brd_no, vport->vpi); | ||
4377 | return 1; | 4289 | return 1; |
4378 | } | 4290 | } |
4379 | 4291 | ||
@@ -4419,11 +4331,8 @@ lpfc_issue_els_fdisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
4419 | if (rc == IOCB_ERROR) { | 4331 | if (rc == IOCB_ERROR) { |
4420 | lpfc_els_free_iocb(phba, elsiocb); | 4332 | lpfc_els_free_iocb(phba, elsiocb); |
4421 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4333 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4422 | 4334 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | |
4423 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 4335 | "0256 Issue FDISC: Cannot send IOCB\n"); |
4424 | "%d (%d):0256 Issue FDISC: Cannot send IOCB\n", | ||
4425 | phba->brd_no, vport->vpi); | ||
4426 | |||
4427 | return 1; | 4336 | return 1; |
4428 | } | 4337 | } |
4429 | lpfc_vport_set_state(vport, FC_VPORT_INITIALIZING); | 4338 | lpfc_vport_set_state(vport, FC_VPORT_INITIALIZING); |