diff options
author | James Smart <james.smart@emulex.com> | 2010-04-06 15:06:30 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-04-11 14:45:53 -0400 |
commit | 78730cfe0649bce86e64eafda9bdffa38f05d396 (patch) | |
tree | 7a0cbdf556602349b81db5962b5aec87bff68d8a /drivers/scsi/lpfc/lpfc_init.c | |
parent | c74959370369cd870560777b7db7ec940565bb85 (diff) |
[SCSI] lpfc 8.3.12: Fix discovery issues
- Add code to prevent unreg_vpi mailbox command from failing.
- Add code to reset the HBA if unreg_vpi mailbox fails with busy status.
- Remove code that was clearing the nlp_type stored during rport discovery.
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_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 03681013d804..cd9697edf860 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -3227,12 +3227,26 @@ lpfc_sli4_perform_vport_cvl(struct lpfc_vport *vport) | |||
3227 | 3227 | ||
3228 | if (!vport) | 3228 | if (!vport) |
3229 | return NULL; | 3229 | return NULL; |
3230 | ndlp = lpfc_findnode_did(vport, Fabric_DID); | ||
3231 | if (!ndlp) | ||
3232 | return NULL; | ||
3233 | phba = vport->phba; | 3230 | phba = vport->phba; |
3234 | if (!phba) | 3231 | if (!phba) |
3235 | return NULL; | 3232 | return NULL; |
3233 | ndlp = lpfc_findnode_did(vport, Fabric_DID); | ||
3234 | if (!ndlp) { | ||
3235 | /* Cannot find existing Fabric ndlp, so allocate a new one */ | ||
3236 | ndlp = mempool_alloc(phba->nlp_mem_pool, GFP_KERNEL); | ||
3237 | if (!ndlp) | ||
3238 | return 0; | ||
3239 | lpfc_nlp_init(vport, ndlp, Fabric_DID); | ||
3240 | /* Set the node type */ | ||
3241 | ndlp->nlp_type |= NLP_FABRIC; | ||
3242 | /* Put ndlp onto node list */ | ||
3243 | lpfc_enqueue_node(vport, ndlp); | ||
3244 | } else if (!NLP_CHK_NODE_ACT(ndlp)) { | ||
3245 | /* re-setup ndlp without removing from node list */ | ||
3246 | ndlp = lpfc_enable_node(vport, ndlp, NLP_STE_UNUSED_NODE); | ||
3247 | if (!ndlp) | ||
3248 | return 0; | ||
3249 | } | ||
3236 | if (phba->pport->port_state <= LPFC_FLOGI) | 3250 | if (phba->pport->port_state <= LPFC_FLOGI) |
3237 | return NULL; | 3251 | return NULL; |
3238 | /* If virtual link is not yet instantiated ignore CVL */ | 3252 | /* If virtual link is not yet instantiated ignore CVL */ |