aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_hbadisc.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2010-10-22 11:06:38 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-10-26 11:42:27 -0400
commit5af5eee7ca4051d8ca31edeb5216831da9625b5c (patch)
tree9f631c04f8d626d3e7c0ef2611941f3f9cad66af /drivers/scsi/lpfc/lpfc_hbadisc.c
parenta93ff37a8a869c7065a1b05f75e69bfb74eb599c (diff)
[SCSI] lpfc 8.3.18: Adapter Shutdown and Unregistration cleanup
Adapter Shutdown and Unregistration cleanup - Correct the logic around hba shutdown. Prior to final reset, the driver must wait for all XRIs to return from the adapter. Added logic to poll, progressively slowing the poll rate as delay gets longer. - Correct behavior around the rsvd1 field in UNREG_RPI_ALL mailbox completion and final rpi cleanup. - Updated logic to move pending VPI registrations to their completion in cases where a CVL may be received while registration in progress. - Added unreg all rpi mailbox command before unreg vpi. 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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 05c9398a723d..a5d1695dac3d 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -794,6 +794,8 @@ lpfc_cleanup_rpis(struct lpfc_vport *vport, int remove)
794 : NLP_EVT_DEVICE_RECOVERY); 794 : NLP_EVT_DEVICE_RECOVERY);
795 } 795 }
796 if (phba->sli3_options & LPFC_SLI3_VPORT_TEARDOWN) { 796 if (phba->sli3_options & LPFC_SLI3_VPORT_TEARDOWN) {
797 if (phba->sli_rev == LPFC_SLI_REV4)
798 lpfc_sli4_unreg_all_rpis(vport);
797 lpfc_mbx_unreg_vpi(vport); 799 lpfc_mbx_unreg_vpi(vport);
798 spin_lock_irq(shost->host_lock); 800 spin_lock_irq(shost->host_lock);
799 vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI; 801 vport->fc_flag |= FC_VPORT_NEEDS_REG_VPI;
@@ -4080,6 +4082,11 @@ lpfc_unreg_all_rpis(struct lpfc_vport *vport)
4080 LPFC_MBOXQ_t *mbox; 4082 LPFC_MBOXQ_t *mbox;
4081 int rc; 4083 int rc;
4082 4084
4085 if (phba->sli_rev == LPFC_SLI_REV4) {
4086 lpfc_sli4_unreg_all_rpis(vport);
4087 return;
4088 }
4089
4083 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); 4090 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
4084 if (mbox) { 4091 if (mbox) {
4085 lpfc_unreg_login(phba, vport->vpi, 0xffff, mbox); 4092 lpfc_unreg_login(phba, vport->vpi, 0xffff, mbox);
@@ -5354,6 +5361,8 @@ lpfc_unregister_fcf_prep(struct lpfc_hba *phba)
5354 if (ndlp) 5361 if (ndlp)
5355 lpfc_cancel_retry_delay_tmo(vports[i], ndlp); 5362 lpfc_cancel_retry_delay_tmo(vports[i], ndlp);
5356 lpfc_cleanup_pending_mbox(vports[i]); 5363 lpfc_cleanup_pending_mbox(vports[i]);
5364 if (phba->sli_rev == LPFC_SLI_REV4)
5365 lpfc_sli4_unreg_all_rpis(vports[i]);
5357 lpfc_mbx_unreg_vpi(vports[i]); 5366 lpfc_mbx_unreg_vpi(vports[i]);
5358 shost = lpfc_shost_from_vport(vports[i]); 5367 shost = lpfc_shost_from_vport(vports[i]);
5359 spin_lock_irq(shost->host_lock); 5368 spin_lock_irq(shost->host_lock);