aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_mbox.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2011-02-16 12:39:24 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-02-18 13:39:18 -0500
commitfedd3b7b93302c7789bd3eeb190653cfb0fe7645 (patch)
treed4fef56133462b9879c63d15be391b9ea3490d19 /drivers/scsi/lpfc/lpfc_mbox.c
parent382be668c5a284844f9dcbb5b1cb8ffba2386d80 (diff)
[SCSI] lpfc 8.3.21: Critical Errors and Bug Fixes
Critical Errors: - Correctly handle non-zero return lpfc_workq_post_event and return ENOMEM - Save the irq level when locking the host_lock in lpfc_findnode_did Bug Fixes: - Adjust payload_length and request_length for sli4_config mailbox commands. - Add the freed sgl/XRI to the tail of the list rather than to the head. - Set the FC_VPORT_NEEDS_INIT_VPI on vport deletes and check it before issuing a fdisc on an els retry. - Only call lpfc_hba_init_link() if phba->cfg_suppress_link_up is LPFC_INITIALIZE_LINK. - Add support for SLI-4 Performance Hints 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.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c
index 23403c650207..9fb4345ec021 100644
--- a/drivers/scsi/lpfc/lpfc_mbox.c
+++ b/drivers/scsi/lpfc/lpfc_mbox.c
@@ -1692,7 +1692,7 @@ lpfc_sli4_mbox_cmd_free(struct lpfc_hba *phba, struct lpfcMboxq *mbox)
1692 * @mbox: pointer to lpfc mbox command. 1692 * @mbox: pointer to lpfc mbox command.
1693 * @subsystem: The sli4 config sub mailbox subsystem. 1693 * @subsystem: The sli4 config sub mailbox subsystem.
1694 * @opcode: The sli4 config sub mailbox command opcode. 1694 * @opcode: The sli4 config sub mailbox command opcode.
1695 * @length: Length of the sli4 config mailbox command. 1695 * @length: Length of the sli4 config mailbox command (including sub-header).
1696 * 1696 *
1697 * This routine sets up the header fields of SLI4 specific mailbox command 1697 * This routine sets up the header fields of SLI4 specific mailbox command
1698 * for sending IOCTL command. 1698 * for sending IOCTL command.
@@ -1723,14 +1723,14 @@ lpfc_sli4_config(struct lpfc_hba *phba, struct lpfcMboxq *mbox,
1723 if (emb) { 1723 if (emb) {
1724 /* Set up main header fields */ 1724 /* Set up main header fields */
1725 bf_set(lpfc_mbox_hdr_emb, &sli4_config->header.cfg_mhdr, 1); 1725 bf_set(lpfc_mbox_hdr_emb, &sli4_config->header.cfg_mhdr, 1);
1726 sli4_config->header.cfg_mhdr.payload_length = 1726 sli4_config->header.cfg_mhdr.payload_length = length;
1727 LPFC_MBX_CMD_HDR_LENGTH + length;
1728 /* Set up sub-header fields following main header */ 1727 /* Set up sub-header fields following main header */
1729 bf_set(lpfc_mbox_hdr_opcode, 1728 bf_set(lpfc_mbox_hdr_opcode,
1730 &sli4_config->header.cfg_shdr.request, opcode); 1729 &sli4_config->header.cfg_shdr.request, opcode);
1731 bf_set(lpfc_mbox_hdr_subsystem, 1730 bf_set(lpfc_mbox_hdr_subsystem,
1732 &sli4_config->header.cfg_shdr.request, subsystem); 1731 &sli4_config->header.cfg_shdr.request, subsystem);
1733 sli4_config->header.cfg_shdr.request.request_length = length; 1732 sli4_config->header.cfg_shdr.request.request_length =
1733 length - LPFC_MBX_CMD_HDR_LENGTH;
1734 return length; 1734 return length;
1735 } 1735 }
1736 1736
@@ -1902,6 +1902,7 @@ lpfc_request_features(struct lpfc_hba *phba, struct lpfcMboxq *mboxq)
1902 1902
1903 /* Set up host requested features. */ 1903 /* Set up host requested features. */
1904 bf_set(lpfc_mbx_rq_ftr_rq_fcpi, &mboxq->u.mqe.un.req_ftrs, 1); 1904 bf_set(lpfc_mbx_rq_ftr_rq_fcpi, &mboxq->u.mqe.un.req_ftrs, 1);
1905 bf_set(lpfc_mbx_rq_ftr_rq_perfh, &mboxq->u.mqe.un.req_ftrs, 1);
1905 1906
1906 /* Enable DIF (block guard) only if configured to do so. */ 1907 /* Enable DIF (block guard) only if configured to do so. */
1907 if (phba->cfg_enable_bg) 1908 if (phba->cfg_enable_bg)
@@ -2159,17 +2160,16 @@ lpfc_supported_pages(struct lpfcMboxq *mbox)
2159} 2160}
2160 2161
2161/** 2162/**
2162 * lpfc_sli4_params - Initialize the PORT_CAPABILITIES SLI4 Params 2163 * lpfc_pc_sli4_params - Initialize the PORT_CAPABILITIES SLI4 Params mbox cmd.
2163 * mailbox command.
2164 * @mbox: pointer to lpfc mbox command to initialize. 2164 * @mbox: pointer to lpfc mbox command to initialize.
2165 * 2165 *
2166 * The PORT_CAPABILITIES SLI4 parameters mailbox command is issued to 2166 * The PORT_CAPABILITIES SLI4 parameters mailbox command is issued to
2167 * retrieve the particular SLI4 features supported by the port. 2167 * retrieve the particular SLI4 features supported by the port.
2168 **/ 2168 **/
2169void 2169void
2170lpfc_sli4_params(struct lpfcMboxq *mbox) 2170lpfc_pc_sli4_params(struct lpfcMboxq *mbox)
2171{ 2171{
2172 struct lpfc_mbx_sli4_params *sli4_params; 2172 struct lpfc_mbx_pc_sli4_params *sli4_params;
2173 2173
2174 memset(mbox, 0, sizeof(*mbox)); 2174 memset(mbox, 0, sizeof(*mbox));
2175 sli4_params = &mbox->u.mqe.un.sli4_params; 2175 sli4_params = &mbox->u.mqe.un.sli4_params;