diff options
author | James Smart <james.smart@emulex.com> | 2013-01-03 15:43:53 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-01-29 19:28:11 -0500 |
commit | 8b455cf351bba1b9e46d6a1350888be9f6a289d2 (patch) | |
tree | e51b54c2033529ca9f5d47bcf9967c9ed1c0dce9 /drivers/scsi/lpfc | |
parent | edccdc17d6db65ed3b2d480d9b011f87a50a7daa (diff) |
[SCSI] lpfc 8.3.37: Fixed stale ndlp state when the node is marked for deferred removal.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nportdisc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index d8fadcb2db73..46128c679202 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c | |||
@@ -1115,6 +1115,13 @@ out: | |||
1115 | "0261 Cannot Register NameServer login\n"); | 1115 | "0261 Cannot Register NameServer login\n"); |
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | /* | ||
1119 | ** In case the node reference counter does not go to zero, ensure that | ||
1120 | ** the stale state for the node is not processed. | ||
1121 | */ | ||
1122 | |||
1123 | ndlp->nlp_prev_state = ndlp->nlp_state; | ||
1124 | lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); | ||
1118 | spin_lock_irq(shost->host_lock); | 1125 | spin_lock_irq(shost->host_lock); |
1119 | ndlp->nlp_flag |= NLP_DEFER_RM; | 1126 | ndlp->nlp_flag |= NLP_DEFER_RM; |
1120 | spin_unlock_irq(shost->host_lock); | 1127 | spin_unlock_irq(shost->host_lock); |
@@ -2159,13 +2166,16 @@ lpfc_cmpl_plogi_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
2159 | { | 2166 | { |
2160 | struct lpfc_iocbq *cmdiocb, *rspiocb; | 2167 | struct lpfc_iocbq *cmdiocb, *rspiocb; |
2161 | IOCB_t *irsp; | 2168 | IOCB_t *irsp; |
2169 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | ||
2162 | 2170 | ||
2163 | cmdiocb = (struct lpfc_iocbq *) arg; | 2171 | cmdiocb = (struct lpfc_iocbq *) arg; |
2164 | rspiocb = cmdiocb->context_un.rsp_iocb; | 2172 | rspiocb = cmdiocb->context_un.rsp_iocb; |
2165 | 2173 | ||
2166 | irsp = &rspiocb->iocb; | 2174 | irsp = &rspiocb->iocb; |
2167 | if (irsp->ulpStatus) { | 2175 | if (irsp->ulpStatus) { |
2176 | spin_lock_irq(shost->host_lock); | ||
2168 | ndlp->nlp_flag |= NLP_DEFER_RM; | 2177 | ndlp->nlp_flag |= NLP_DEFER_RM; |
2178 | spin_unlock_irq(shost->host_lock); | ||
2169 | return NLP_STE_FREED_NODE; | 2179 | return NLP_STE_FREED_NODE; |
2170 | } | 2180 | } |
2171 | return ndlp->nlp_state; | 2181 | return ndlp->nlp_state; |