aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.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_sli.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_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index a359d2b873c..ed8f048dfb5 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -96,7 +96,8 @@ lpfc_sli4_wq_put(struct lpfc_queue *q, union lpfc_wqe *wqe)
96 /* set consumption flag every once in a while */ 96 /* set consumption flag every once in a while */
97 if (!((q->host_index + 1) % LPFC_RELEASE_NOTIFICATION_INTERVAL)) 97 if (!((q->host_index + 1) % LPFC_RELEASE_NOTIFICATION_INTERVAL))
98 bf_set(wqe_wqec, &wqe->generic.wqe_com, 1); 98 bf_set(wqe_wqec, &wqe->generic.wqe_com, 1);
99 99 if (q->phba->sli3_options & LPFC_SLI4_PHWQ_ENABLED)
100 bf_set(wqe_wqid, &wqe->generic.wqe_com, q->queue_id);
100 lpfc_sli_pcimem_bcopy(wqe, temp_wqe, q->entry_size); 101 lpfc_sli_pcimem_bcopy(wqe, temp_wqe, q->entry_size);
101 102
102 /* Update the host index before invoking device */ 103 /* Update the host index before invoking device */
@@ -969,7 +970,8 @@ __lpfc_sli_release_iocbq_s4(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
969 } else { 970 } else {
970 sglq->state = SGL_FREED; 971 sglq->state = SGL_FREED;
971 sglq->ndlp = NULL; 972 sglq->ndlp = NULL;
972 list_add(&sglq->list, &phba->sli4_hba.lpfc_sgl_list); 973 list_add_tail(&sglq->list,
974 &phba->sli4_hba.lpfc_sgl_list);
973 975
974 /* Check if TXQ queue needs to be serviced */ 976 /* Check if TXQ queue needs to be serviced */
975 if (pring->txq_cnt) 977 if (pring->txq_cnt)
@@ -4817,7 +4819,10 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
4817 "0378 No support for fcpi mode.\n"); 4819 "0378 No support for fcpi mode.\n");
4818 ftr_rsp++; 4820 ftr_rsp++;
4819 } 4821 }
4820 4822 if (bf_get(lpfc_mbx_rq_ftr_rsp_perfh, &mqe->un.req_ftrs))
4823 phba->sli3_options |= LPFC_SLI4_PERFH_ENABLED;
4824 else
4825 phba->sli3_options &= ~LPFC_SLI4_PERFH_ENABLED;
4821 /* 4826 /*
4822 * If the port cannot support the host's requested features 4827 * If the port cannot support the host's requested features
4823 * then turn off the global config parameters to disable the 4828 * then turn off the global config parameters to disable the
@@ -5004,7 +5009,8 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
5004 spin_lock_irq(&phba->hbalock); 5009 spin_lock_irq(&phba->hbalock);
5005 phba->link_state = LPFC_LINK_DOWN; 5010 phba->link_state = LPFC_LINK_DOWN;
5006 spin_unlock_irq(&phba->hbalock); 5011 spin_unlock_irq(&phba->hbalock);
5007 rc = phba->lpfc_hba_init_link(phba, MBX_NOWAIT); 5012 if (phba->cfg_suppress_link_up == LPFC_INITIALIZE_LINK)
5013 rc = phba->lpfc_hba_init_link(phba, MBX_NOWAIT);
5008out_unset_queue: 5014out_unset_queue:
5009 /* Unset all the queues set up in this routine when error out */ 5015 /* Unset all the queues set up in this routine when error out */
5010 if (rc) 5016 if (rc)
@@ -11189,7 +11195,7 @@ lpfc_rq_destroy(struct lpfc_hba *phba, struct lpfc_queue *hrq,
11189 if (!mbox) 11195 if (!mbox)
11190 return -ENOMEM; 11196 return -ENOMEM;
11191 length = (sizeof(struct lpfc_mbx_rq_destroy) - 11197 length = (sizeof(struct lpfc_mbx_rq_destroy) -
11192 sizeof(struct mbox_header)); 11198 sizeof(struct lpfc_sli4_cfg_mhdr));
11193 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE, 11199 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE,
11194 LPFC_MBOX_OPCODE_FCOE_RQ_DESTROY, 11200 LPFC_MBOX_OPCODE_FCOE_RQ_DESTROY,
11195 length, LPFC_SLI4_MBX_EMBED); 11201 length, LPFC_SLI4_MBX_EMBED);
@@ -11279,7 +11285,7 @@ lpfc_sli4_post_sgl(struct lpfc_hba *phba,
11279 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE, 11285 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE,
11280 LPFC_MBOX_OPCODE_FCOE_POST_SGL_PAGES, 11286 LPFC_MBOX_OPCODE_FCOE_POST_SGL_PAGES,
11281 sizeof(struct lpfc_mbx_post_sgl_pages) - 11287 sizeof(struct lpfc_mbx_post_sgl_pages) -
11282 sizeof(struct mbox_header), LPFC_SLI4_MBX_EMBED); 11288 sizeof(struct lpfc_sli4_cfg_mhdr), LPFC_SLI4_MBX_EMBED);
11283 11289
11284 post_sgl_pages = (struct lpfc_mbx_post_sgl_pages *) 11290 post_sgl_pages = (struct lpfc_mbx_post_sgl_pages *)
11285 &mbox->u.mqe.un.post_sgl_pages; 11291 &mbox->u.mqe.un.post_sgl_pages;
@@ -12402,7 +12408,8 @@ lpfc_sli4_post_rpi_hdr(struct lpfc_hba *phba, struct lpfc_rpi_hdr *rpi_page)
12402 lpfc_sli4_config(phba, mboxq, LPFC_MBOX_SUBSYSTEM_FCOE, 12408 lpfc_sli4_config(phba, mboxq, LPFC_MBOX_SUBSYSTEM_FCOE,
12403 LPFC_MBOX_OPCODE_FCOE_POST_HDR_TEMPLATE, 12409 LPFC_MBOX_OPCODE_FCOE_POST_HDR_TEMPLATE,
12404 sizeof(struct lpfc_mbx_post_hdr_tmpl) - 12410 sizeof(struct lpfc_mbx_post_hdr_tmpl) -
12405 sizeof(struct mbox_header), LPFC_SLI4_MBX_EMBED); 12411 sizeof(struct lpfc_sli4_cfg_mhdr),
12412 LPFC_SLI4_MBX_EMBED);
12406 bf_set(lpfc_mbx_post_hdr_tmpl_page_cnt, 12413 bf_set(lpfc_mbx_post_hdr_tmpl_page_cnt,
12407 hdr_tmpl, rpi_page->page_count); 12414 hdr_tmpl, rpi_page->page_count);
12408 bf_set(lpfc_mbx_post_hdr_tmpl_rpi_offset, hdr_tmpl, 12415 bf_set(lpfc_mbx_post_hdr_tmpl_rpi_offset, hdr_tmpl,