diff options
author | James Smart <james.smart@emulex.com> | 2010-06-07 15:23:17 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:01:31 -0400 |
commit | ffc954936b134cc6d2eba1282cc71084929c3704 (patch) | |
tree | 22cbdde46b1ee531c8664335ec35a0c8767bad79 /drivers/scsi/lpfc/lpfc_nportdisc.c | |
parent | 8701f18504751a5b89be3203e28c5ec04c147167 (diff) |
[SCSI] lpfc 8.3.13: FC Discovery Fixes and enhancements.
- Retry PLOGI up to 48 times when LS_RJT reason is
"Unable to supply requested data."
- When dev loss timeout occures do not change state if there
is an outstanding REG_LOGIN.
- Add logic to ignore REG_LOGIN completion if discovery is
restarted while waiting for REG_LOGIN.
- Only change state on REG_LOGIN completion if still in
state waiting for REG_LOGIN completion.
- Only send ADISCs to FCP-2 Targets (not Initiators).
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nportdisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nportdisc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index b90820a699fd..9810b3d3cc53 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c | |||
@@ -626,7 +626,8 @@ lpfc_disc_set_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | |||
626 | if (!(vport->fc_flag & FC_PT2PT)) { | 626 | if (!(vport->fc_flag & FC_PT2PT)) { |
627 | /* Check config parameter use-adisc or FCP-2 */ | 627 | /* Check config parameter use-adisc or FCP-2 */ |
628 | if ((vport->cfg_use_adisc && (vport->fc_flag & FC_RSCN_MODE)) || | 628 | if ((vport->cfg_use_adisc && (vport->fc_flag & FC_RSCN_MODE)) || |
629 | ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE) { | 629 | ((ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE) && |
630 | (ndlp->nlp_type & NLP_FCP_TARGET))) { | ||
630 | spin_lock_irq(shost->host_lock); | 631 | spin_lock_irq(shost->host_lock); |
631 | ndlp->nlp_flag |= NLP_NPR_ADISC; | 632 | ndlp->nlp_flag |= NLP_NPR_ADISC; |
632 | spin_unlock_irq(shost->host_lock); | 633 | spin_unlock_irq(shost->host_lock); |
@@ -962,6 +963,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, | |||
962 | mbox->mbox_cmpl = lpfc_mbx_cmpl_fdmi_reg_login; | 963 | mbox->mbox_cmpl = lpfc_mbx_cmpl_fdmi_reg_login; |
963 | break; | 964 | break; |
964 | default: | 965 | default: |
966 | ndlp->nlp_flag |= NLP_REG_LOGIN_SEND; | ||
965 | mbox->mbox_cmpl = lpfc_mbx_cmpl_reg_login; | 967 | mbox->mbox_cmpl = lpfc_mbx_cmpl_reg_login; |
966 | } | 968 | } |
967 | mbox->context2 = lpfc_nlp_get(ndlp); | 969 | mbox->context2 = lpfc_nlp_get(ndlp); |
@@ -972,6 +974,8 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, | |||
972 | NLP_STE_REG_LOGIN_ISSUE); | 974 | NLP_STE_REG_LOGIN_ISSUE); |
973 | return ndlp->nlp_state; | 975 | return ndlp->nlp_state; |
974 | } | 976 | } |
977 | if (ndlp->nlp_flag & NLP_REG_LOGIN_SEND) | ||
978 | ndlp->nlp_flag &= ~NLP_REG_LOGIN_SEND; | ||
975 | /* decrement node reference count to the failed mbox | 979 | /* decrement node reference count to the failed mbox |
976 | * command | 980 | * command |
977 | */ | 981 | */ |
@@ -1458,6 +1462,7 @@ lpfc_device_recov_reglogin_issue(struct lpfc_vport *vport, | |||
1458 | ndlp->nlp_prev_state = NLP_STE_REG_LOGIN_ISSUE; | 1462 | ndlp->nlp_prev_state = NLP_STE_REG_LOGIN_ISSUE; |
1459 | lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); | 1463 | lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); |
1460 | spin_lock_irq(shost->host_lock); | 1464 | spin_lock_irq(shost->host_lock); |
1465 | ndlp->nlp_flag |= NLP_IGNR_REG_CMPL; | ||
1461 | ndlp->nlp_flag &= ~(NLP_NODEV_REMOVE | NLP_NPR_2B_DISC); | 1466 | ndlp->nlp_flag &= ~(NLP_NODEV_REMOVE | NLP_NPR_2B_DISC); |
1462 | spin_unlock_irq(shost->host_lock); | 1467 | spin_unlock_irq(shost->host_lock); |
1463 | lpfc_disc_set_adisc(vport, ndlp); | 1468 | lpfc_disc_set_adisc(vport, ndlp); |