aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_mbox.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_mbox.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_mbox.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_mbox.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c
index 0dfa310cd609..62d0957e1d4c 100644
--- a/drivers/scsi/lpfc/lpfc_mbox.c
+++ b/drivers/scsi/lpfc/lpfc_mbox.c
@@ -797,6 +797,34 @@ lpfc_unreg_login(struct lpfc_hba *phba, uint16_t vpi, uint32_t rpi,
797} 797}
798 798
799/** 799/**
800 * lpfc_sli4_unreg_all_rpis - unregister all RPIs for a vport on SLI4 HBA.
801 * @vport: pointer to a vport object.
802 *
803 * This routine sends mailbox command to unregister all active RPIs for
804 * a vport.
805 **/
806void
807lpfc_sli4_unreg_all_rpis(struct lpfc_vport *vport)
808{
809 struct lpfc_hba *phba = vport->phba;
810 LPFC_MBOXQ_t *mbox;
811 int rc;
812
813 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
814 if (mbox) {
815 lpfc_unreg_login(phba, vport->vpi,
816 vport->vpi + phba->vpi_base, mbox);
817 mbox->u.mb.un.varUnregLogin.rsvd1 = 0x4000 ;
818 mbox->vport = vport;
819 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
820 mbox->context1 = NULL;
821 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT);
822 if (rc == MBX_NOT_FINISHED)
823 mempool_free(mbox, phba->mbox_mem_pool);
824 }
825}
826
827/**
800 * lpfc_reg_vpi - Prepare a mailbox command for registering vport identifier 828 * lpfc_reg_vpi - Prepare a mailbox command for registering vport identifier
801 * @phba: pointer to lpfc hba data structure. 829 * @phba: pointer to lpfc hba data structure.
802 * @vpi: virtual N_Port identifier. 830 * @vpi: virtual N_Port identifier.