diff options
author | James Smart <James.Smart@Emulex.Com> | 2007-08-02 11:09:59 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-08-01 13:19:24 -0400 |
commit | 3de2a653a127c468284c48e233719dc39769e354 (patch) | |
tree | c57fd1c8b8ce28d2e2e87ddbff0ecb10ac1524f9 /drivers/scsi/lpfc/lpfc_nportdisc.c | |
parent | 549e55cd2a1b83ea45ac17fb6c309654a3d371a4 (diff) |
[SCSI] lpfc 8.2.2 : Attribute and Parameter splits for vport and physical port
- Split attributes up into vport and non-vport attributes.
- Move vport specific cfg params to vport
Many of the vport-specific behaviors were still global attributes
on the physical port. Move them to the vport itself.
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_nportdisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nportdisc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index bca2f5c9b4ba..9c159a8e6e8c 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c | |||
@@ -304,7 +304,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
304 | ndlp->nlp_DID, ndlp->nlp_state, ndlp->nlp_flag, | 304 | ndlp->nlp_DID, ndlp->nlp_state, ndlp->nlp_flag, |
305 | ndlp->nlp_rpi); | 305 | ndlp->nlp_rpi); |
306 | 306 | ||
307 | if (phba->cfg_fcp_class == 2 && sp->cls2.classValid) | 307 | if (vport->cfg_fcp_class == 2 && sp->cls2.classValid) |
308 | ndlp->nlp_fcp_info |= CLASS2; | 308 | ndlp->nlp_fcp_info |= CLASS2; |
309 | else | 309 | else |
310 | ndlp->nlp_fcp_info |= CLASS3; | 310 | ndlp->nlp_fcp_info |= CLASS3; |
@@ -392,7 +392,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
392 | } | 392 | } |
393 | 393 | ||
394 | if ((vport->port_type == LPFC_NPIV_PORT && | 394 | if ((vport->port_type == LPFC_NPIV_PORT && |
395 | phba->cfg_vport_restrict_login)) { | 395 | vport->cfg_restrict_login)) { |
396 | 396 | ||
397 | /* In order to preserve RPIs, we want to cleanup | 397 | /* In order to preserve RPIs, we want to cleanup |
398 | * the default RPI the firmware created to rcv | 398 | * the default RPI the firmware created to rcv |
@@ -564,10 +564,9 @@ static uint32_t | |||
564 | lpfc_disc_set_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | 564 | lpfc_disc_set_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) |
565 | { | 565 | { |
566 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | 566 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); |
567 | struct lpfc_hba *phba = vport->phba; | ||
568 | 567 | ||
569 | /* Check config parameter use-adisc or FCP-2 */ | 568 | /* Check config parameter use-adisc or FCP-2 */ |
570 | if ((phba->cfg_use_adisc && (vport->fc_flag & FC_RSCN_MODE)) || | 569 | if ((vport->cfg_use_adisc && (vport->fc_flag & FC_RSCN_MODE)) || |
571 | ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE) { | 570 | ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE) { |
572 | spin_lock_irq(shost->host_lock); | 571 | spin_lock_irq(shost->host_lock); |
573 | ndlp->nlp_flag |= NLP_NPR_ADISC; | 572 | ndlp->nlp_flag |= NLP_NPR_ADISC; |
@@ -787,7 +786,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, | |||
787 | ndlp->nlp_DID, ndlp->nlp_state, | 786 | ndlp->nlp_DID, ndlp->nlp_state, |
788 | ndlp->nlp_flag, ndlp->nlp_rpi); | 787 | ndlp->nlp_flag, ndlp->nlp_rpi); |
789 | 788 | ||
790 | if (phba->cfg_fcp_class == 2 && (sp->cls2.classValid)) | 789 | if (vport->cfg_fcp_class == 2 && (sp->cls2.classValid)) |
791 | ndlp->nlp_fcp_info |= CLASS2; | 790 | ndlp->nlp_fcp_info |= CLASS2; |
792 | else | 791 | else |
793 | ndlp->nlp_fcp_info |= CLASS3; | 792 | ndlp->nlp_fcp_info |= CLASS3; |
@@ -1358,7 +1357,7 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
1358 | irsp = &rspiocb->iocb; | 1357 | irsp = &rspiocb->iocb; |
1359 | if (irsp->ulpStatus) { | 1358 | if (irsp->ulpStatus) { |
1360 | if ((vport->port_type == LPFC_NPIV_PORT) && | 1359 | if ((vport->port_type == LPFC_NPIV_PORT) && |
1361 | phba->cfg_vport_restrict_login) { | 1360 | vport->cfg_restrict_login) { |
1362 | goto out; | 1361 | goto out; |
1363 | } | 1362 | } |
1364 | ndlp->nlp_prev_state = NLP_STE_PRLI_ISSUE; | 1363 | ndlp->nlp_prev_state = NLP_STE_PRLI_ISSUE; |
@@ -1380,7 +1379,7 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
1380 | } | 1379 | } |
1381 | if (!(ndlp->nlp_type & NLP_FCP_TARGET) && | 1380 | if (!(ndlp->nlp_type & NLP_FCP_TARGET) && |
1382 | (vport->port_type == LPFC_NPIV_PORT) && | 1381 | (vport->port_type == LPFC_NPIV_PORT) && |
1383 | phba->cfg_vport_restrict_login) { | 1382 | vport->cfg_restrict_login) { |
1384 | out: | 1383 | out: |
1385 | spin_lock_irq(shost->host_lock); | 1384 | spin_lock_irq(shost->host_lock); |
1386 | ndlp->nlp_flag |= NLP_TARGET_REMOVE; | 1385 | ndlp->nlp_flag |= NLP_TARGET_REMOVE; |