From: James.Smart@Emulex.Com Date: Sat, 25 Jun 2005 14:34:33 +0000 (-0400) Subject: [SCSI] lpfc: Fix ADISC completion incorrectly putting initiators on mapped list X-Git-Tag: v2.6.13-rc4~75^2~37 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2501322eee84763a07fd4a3eed81b63c1837e204;p=linux-2.6 [SCSI] lpfc: Fix ADISC completion incorrectly putting initiators on mapped list 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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index e7470a4738..421356eabc 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -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); }