aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2010-09-29 11:19:14 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-10-07 18:30:36 -0400
commit3677a3a76e190f801af0778df3b8efa1fe161a6e (patch)
tree1a1ebb2267f27963a5699ff27f04b88bec2533c8 /drivers/scsi/lpfc/lpfc_sli.c
parenteee8877ee5e8a879f78034001b5e7c04db005ab2 (diff)
[SCSI] lpfc 8.3.17: Replace function reset methodology
Replace graceful teardown steps with the singular function reset command. 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_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 34dd87f542c2..0d1e187b005d 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -6930,37 +6930,6 @@ lpfc_sli_hba_down(struct lpfc_hba *phba)
6930} 6930}
6931 6931
6932/** 6932/**
6933 * lpfc_sli4_hba_down - PCI function resource cleanup for the SLI4 HBA
6934 * @phba: Pointer to HBA context object.
6935 *
6936 * This function cleans up all queues, iocb, buffers, mailbox commands while
6937 * shutting down the SLI4 HBA FCoE function. This function is called with no
6938 * lock held and always returns 1.
6939 *
6940 * This function does the following to cleanup driver FCoE function resources:
6941 * - Free discovery resources for each virtual port
6942 * - Cleanup any pending fabric iocbs
6943 * - Iterate through the iocb txq and free each entry in the list.
6944 * - Free up any buffer posted to the HBA.
6945 * - Clean up all the queue entries: WQ, RQ, MQ, EQ, CQ, etc.
6946 * - Free mailbox commands in the mailbox queue.
6947 **/
6948int
6949lpfc_sli4_hba_down(struct lpfc_hba *phba)
6950{
6951 /* Stop the SLI4 device port */
6952 lpfc_stop_port(phba);
6953
6954 /* Tear down the queues in the HBA */
6955 lpfc_sli4_queue_unset(phba);
6956
6957 /* unregister default FCFI from the HBA */
6958 lpfc_sli4_fcfi_unreg(phba, phba->fcf.fcfi);
6959
6960 return 1;
6961}
6962
6963/**
6964 * lpfc_sli_pcimem_bcopy - SLI memory copy function 6933 * lpfc_sli_pcimem_bcopy - SLI memory copy function
6965 * @srcp: Source memory pointer. 6934 * @srcp: Source memory pointer.
6966 * @destp: Destination memory pointer. 6935 * @destp: Destination memory pointer.
@@ -10788,51 +10757,6 @@ lpfc_sli4_post_sgl(struct lpfc_hba *phba,
10788 } 10757 }
10789 return 0; 10758 return 0;
10790} 10759}
10791/**
10792 * lpfc_sli4_remove_all_sgl_pages - Post scatter gather list for an XRI to HBA
10793 * @phba: The virtual port for which this call being executed.
10794 *
10795 * This routine will remove all of the sgl pages registered with the hba.
10796 *
10797 * Return codes:
10798 * 0 - Success
10799 * -ENXIO, -ENOMEM - Failure
10800 **/
10801int
10802lpfc_sli4_remove_all_sgl_pages(struct lpfc_hba *phba)
10803{
10804 LPFC_MBOXQ_t *mbox;
10805 int rc;
10806 uint32_t shdr_status, shdr_add_status;
10807 union lpfc_sli4_cfg_shdr *shdr;
10808
10809 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
10810 if (!mbox)
10811 return -ENOMEM;
10812
10813 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE,
10814 LPFC_MBOX_OPCODE_FCOE_REMOVE_SGL_PAGES, 0,
10815 LPFC_SLI4_MBX_EMBED);
10816 if (!phba->sli4_hba.intr_enable)
10817 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
10818 else
10819 rc = lpfc_sli_issue_mbox_wait(phba, mbox, LPFC_MBOX_TMO);
10820 /* The IOCTL status is embedded in the mailbox subheader. */
10821 shdr = (union lpfc_sli4_cfg_shdr *)
10822 &mbox->u.mqe.un.sli4_config.header.cfg_shdr;
10823 shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response);
10824 shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response);
10825 if (rc != MBX_TIMEOUT)
10826 mempool_free(mbox, phba->mbox_mem_pool);
10827 if (shdr_status || shdr_add_status || rc) {
10828 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
10829 "2512 REMOVE_ALL_SGL_PAGES mailbox failed with "
10830 "status x%x add_status x%x, mbx status x%x\n",
10831 shdr_status, shdr_add_status, rc);
10832 rc = -ENXIO;
10833 }
10834 return rc;
10835}
10836 10760
10837/** 10761/**
10838 * lpfc_sli4_next_xritag - Get an xritag for the io 10762 * lpfc_sli4_next_xritag - Get an xritag for the io