]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] lpfc: Fix ADISC completion incorrectly putting initiators on mapped list
authorJames.Smart@Emulex.Com <James.Smart@Emulex.Com>
Sat, 25 Jun 2005 14:34:33 +0000 (10:34 -0400)
committerJames Bottomley <jejb@mulgrave.(none)>
Sat, 2 Jul 2005 23:58:48 +0000 (18:58 -0500)
Symptom - An unmapped node (initiator) that goes away in a situation
such as cable pull, comes back as a mapped node.  Fix - On ADISC
completion, put a list on the mapped list only if it is a FCP_TARGET.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/lpfc/lpfc_nportdisc.c

index e7470a4738c5f41ee5245a0a234eac5107ed5acd..421356eabc224ff42e8dccb4a9f0e4b4a2220d32 100644 (file)
@@ -950,8 +950,13 @@ lpfc_cmpl_adisc_adisc_issue(struct lpfc_hba * phba,
                lpfc_unreg_rpi(phba, ndlp);
                return (ndlp->nlp_state);
        }
-       ndlp->nlp_state = NLP_STE_MAPPED_NODE;
-       lpfc_nlp_list(phba, ndlp, NLP_MAPPED_LIST);
+       if (ndlp->nlp_type & NLP_FCP_TARGET) {
+               ndlp->nlp_state = NLP_STE_MAPPED_NODE;
+               lpfc_nlp_list(phba, ndlp, NLP_MAPPED_LIST);
+       } else {
+               ndlp->nlp_state = NLP_STE_UNMAPPED_NODE;
+               lpfc_nlp_list(phba, ndlp, NLP_UNMAPPED_LIST);
+       }
        return (ndlp->nlp_state);
 }