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_hbadisc.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_hbadisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index d2b55f05aa02..1f87b4fb8b50 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -475,6 +475,10 @@ lpfc_work_list_done(struct lpfc_hba *phba) | |||
475 | lpfc_send_fastpath_evt(phba, evtp); | 475 | lpfc_send_fastpath_evt(phba, evtp); |
476 | free_evt = 0; | 476 | free_evt = 0; |
477 | break; | 477 | break; |
478 | case LPFC_EVT_RESET_HBA: | ||
479 | if (!(phba->pport->load_flag & FC_UNLOADING)) | ||
480 | lpfc_reset_hba(phba); | ||
481 | break; | ||
478 | } | 482 | } |
479 | if (free_evt) | 483 | if (free_evt) |
480 | kfree(evtp); | 484 | kfree(evtp); |
@@ -2737,11 +2741,18 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
2737 | switch (mb->mbxStatus) { | 2741 | switch (mb->mbxStatus) { |
2738 | case 0x0011: | 2742 | case 0x0011: |
2739 | case 0x0020: | 2743 | case 0x0020: |
2740 | case 0x9700: | ||
2741 | lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE, | 2744 | lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE, |
2742 | "0911 cmpl_unreg_vpi, mb status = 0x%x\n", | 2745 | "0911 cmpl_unreg_vpi, mb status = 0x%x\n", |
2743 | mb->mbxStatus); | 2746 | mb->mbxStatus); |
2744 | break; | 2747 | break; |
2748 | /* If VPI is busy, reset the HBA */ | ||
2749 | case 0x9700: | ||
2750 | lpfc_printf_vlog(vport, KERN_ERR, LOG_NODE, | ||
2751 | "2798 Unreg_vpi failed vpi 0x%x, mb status = 0x%x\n", | ||
2752 | vport->vpi, mb->mbxStatus); | ||
2753 | if (!(phba->pport->load_flag & FC_UNLOADING)) | ||
2754 | lpfc_workq_post_event(phba, NULL, NULL, | ||
2755 | LPFC_EVT_RESET_HBA); | ||
2745 | } | 2756 | } |
2746 | spin_lock_irq(shost->host_lock); | 2757 | spin_lock_irq(shost->host_lock); |
2747 | vport->vpi_state &= ~LPFC_VPI_REGISTERED; | 2758 | vport->vpi_state &= ~LPFC_VPI_REGISTERED; |
@@ -3233,7 +3244,6 @@ lpfc_nlp_state_cleanup(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
3233 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | 3244 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); |
3234 | 3245 | ||
3235 | if (new_state == NLP_STE_UNMAPPED_NODE) { | 3246 | if (new_state == NLP_STE_UNMAPPED_NODE) { |
3236 | ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR); | ||
3237 | ndlp->nlp_flag &= ~NLP_NODEV_REMOVE; | 3247 | ndlp->nlp_flag &= ~NLP_NODEV_REMOVE; |
3238 | ndlp->nlp_type |= NLP_FC_NODE; | 3248 | ndlp->nlp_type |= NLP_FC_NODE; |
3239 | } | 3249 | } |
@@ -4991,6 +5001,7 @@ lpfc_unregister_fcf_prep(struct lpfc_hba *phba) | |||
4991 | ndlp = lpfc_findnode_did(vports[i], Fabric_DID); | 5001 | ndlp = lpfc_findnode_did(vports[i], Fabric_DID); |
4992 | if (ndlp) | 5002 | if (ndlp) |
4993 | lpfc_cancel_retry_delay_tmo(vports[i], ndlp); | 5003 | lpfc_cancel_retry_delay_tmo(vports[i], ndlp); |
5004 | lpfc_cleanup_pending_mbox(vports[i]); | ||
4994 | lpfc_mbx_unreg_vpi(vports[i]); | 5005 | lpfc_mbx_unreg_vpi(vports[i]); |
4995 | shost = lpfc_shost_from_vport(vports[i]); | 5006 | shost = lpfc_shost_from_vport(vports[i]); |
4996 | spin_lock_irq(shost->host_lock); | 5007 | spin_lock_irq(shost->host_lock); |