aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 580b00bc35ce..837d272cb2d6 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -4769,8 +4769,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
4769 else 4769 else
4770 phba->hba_flag &= ~HBA_FIP_SUPPORT; 4770 phba->hba_flag &= ~HBA_FIP_SUPPORT;
4771 4771
4772 if (phba->sli_rev != LPFC_SLI_REV4 || 4772 if (phba->sli_rev != LPFC_SLI_REV4) {
4773 !(phba->hba_flag & HBA_FCOE_MODE)) {
4774 lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, 4773 lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI,
4775 "0376 READ_REV Error. SLI Level %d " 4774 "0376 READ_REV Error. SLI Level %d "
4776 "FCoE enabled %d\n", 4775 "FCoE enabled %d\n",
@@ -6403,6 +6402,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
6403 uint32_t els_id = LPFC_ELS_ID_DEFAULT; 6402 uint32_t els_id = LPFC_ELS_ID_DEFAULT;
6404 int numBdes, i; 6403 int numBdes, i;
6405 struct ulp_bde64 bde; 6404 struct ulp_bde64 bde;
6405 struct lpfc_nodelist *ndlp;
6406 6406
6407 fip = phba->hba_flag & HBA_FIP_SUPPORT; 6407 fip = phba->hba_flag & HBA_FIP_SUPPORT;
6408 /* The fcp commands will set command type */ 6408 /* The fcp commands will set command type */
@@ -6448,6 +6448,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
6448 6448
6449 switch (iocbq->iocb.ulpCommand) { 6449 switch (iocbq->iocb.ulpCommand) {
6450 case CMD_ELS_REQUEST64_CR: 6450 case CMD_ELS_REQUEST64_CR:
6451 ndlp = (struct lpfc_nodelist *)iocbq->context1;
6451 if (!iocbq->iocb.ulpLe) { 6452 if (!iocbq->iocb.ulpLe) {
6452 lpfc_printf_log(phba, KERN_ERR, LOG_SLI, 6453 lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
6453 "2007 Only Limited Edition cmd Format" 6454 "2007 Only Limited Edition cmd Format"
@@ -6473,6 +6474,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
6473 els_id = ((iocbq->iocb_flag & LPFC_FIP_ELS_ID_MASK) 6474 els_id = ((iocbq->iocb_flag & LPFC_FIP_ELS_ID_MASK)
6474 >> LPFC_FIP_ELS_ID_SHIFT); 6475 >> LPFC_FIP_ELS_ID_SHIFT);
6475 } 6476 }
6477 bf_set(wqe_temp_rpi, &wqe->els_req.wqe_com, ndlp->nlp_rpi);
6476 bf_set(wqe_els_id, &wqe->els_req.wqe_com, els_id); 6478 bf_set(wqe_els_id, &wqe->els_req.wqe_com, els_id);
6477 bf_set(wqe_dbde, &wqe->els_req.wqe_com, 1); 6479 bf_set(wqe_dbde, &wqe->els_req.wqe_com, 1);
6478 bf_set(wqe_iod, &wqe->els_req.wqe_com, LPFC_WQE_IOD_READ); 6480 bf_set(wqe_iod, &wqe->els_req.wqe_com, LPFC_WQE_IOD_READ);
@@ -6605,6 +6607,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
6605 command_type = OTHER_COMMAND; 6607 command_type = OTHER_COMMAND;
6606 break; 6608 break;
6607 case CMD_XMIT_ELS_RSP64_CX: 6609 case CMD_XMIT_ELS_RSP64_CX:
6610 ndlp = (struct lpfc_nodelist *)iocbq->context1;
6608 /* words0-2 BDE memcpy */ 6611 /* words0-2 BDE memcpy */
6609 /* word3 iocb=iotag32 wqe=response_payload_len */ 6612 /* word3 iocb=iotag32 wqe=response_payload_len */
6610 wqe->xmit_els_rsp.response_payload_len = xmit_len; 6613 wqe->xmit_els_rsp.response_payload_len = xmit_len;
@@ -6627,6 +6630,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
6627 bf_set(wqe_lenloc, &wqe->xmit_els_rsp.wqe_com, 6630 bf_set(wqe_lenloc, &wqe->xmit_els_rsp.wqe_com,
6628 LPFC_WQE_LENLOC_WORD3); 6631 LPFC_WQE_LENLOC_WORD3);
6629 bf_set(wqe_ebde_cnt, &wqe->xmit_els_rsp.wqe_com, 0); 6632 bf_set(wqe_ebde_cnt, &wqe->xmit_els_rsp.wqe_com, 0);
6633 bf_set(wqe_rsp_temp_rpi, &wqe->xmit_els_rsp, ndlp->nlp_rpi);
6630 command_type = OTHER_COMMAND; 6634 command_type = OTHER_COMMAND;
6631 break; 6635 break;
6632 case CMD_CLOSE_XRI_CN: 6636 case CMD_CLOSE_XRI_CN:
@@ -10523,8 +10527,8 @@ lpfc_cq_create(struct lpfc_hba *phba, struct lpfc_queue *cq,
10523 bf_set(lpfc_mbox_hdr_version, &shdr->request, 10527 bf_set(lpfc_mbox_hdr_version, &shdr->request,
10524 phba->sli4_hba.pc_sli4_params.cqv); 10528 phba->sli4_hba.pc_sli4_params.cqv);
10525 if (phba->sli4_hba.pc_sli4_params.cqv == LPFC_Q_CREATE_VERSION_2) { 10529 if (phba->sli4_hba.pc_sli4_params.cqv == LPFC_Q_CREATE_VERSION_2) {
10526 bf_set(lpfc_mbx_cq_create_page_size, &cq_create->u.request, 10530 /* FW only supports 1. Should be PAGE_SIZE/SLI4_PAGE_SIZE */
10527 (PAGE_SIZE/SLI4_PAGE_SIZE)); 10531 bf_set(lpfc_mbx_cq_create_page_size, &cq_create->u.request, 1);
10528 bf_set(lpfc_cq_eq_id_2, &cq_create->u.request.context, 10532 bf_set(lpfc_cq_eq_id_2, &cq_create->u.request.context,
10529 eq->queue_id); 10533 eq->queue_id);
10530 } else { 10534 } else {
@@ -10968,6 +10972,12 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq,
10968 &rq_create->u.request.context, 10972 &rq_create->u.request.context,
10969 hrq->entry_count); 10973 hrq->entry_count);
10970 rq_create->u.request.context.buffer_size = LPFC_HDR_BUF_SIZE; 10974 rq_create->u.request.context.buffer_size = LPFC_HDR_BUF_SIZE;
10975 bf_set(lpfc_rq_context_rqe_size,
10976 &rq_create->u.request.context,
10977 LPFC_RQE_SIZE_8);
10978 bf_set(lpfc_rq_context_page_size,
10979 &rq_create->u.request.context,
10980 (PAGE_SIZE/SLI4_PAGE_SIZE));
10971 } else { 10981 } else {
10972 switch (hrq->entry_count) { 10982 switch (hrq->entry_count) {
10973 default: 10983 default:
@@ -11043,9 +11053,12 @@ lpfc_rq_create(struct lpfc_hba *phba, struct lpfc_queue *hrq,
11043 phba->sli4_hba.pc_sli4_params.rqv); 11053 phba->sli4_hba.pc_sli4_params.rqv);
11044 if (phba->sli4_hba.pc_sli4_params.rqv == LPFC_Q_CREATE_VERSION_1) { 11054 if (phba->sli4_hba.pc_sli4_params.rqv == LPFC_Q_CREATE_VERSION_1) {
11045 bf_set(lpfc_rq_context_rqe_count_1, 11055 bf_set(lpfc_rq_context_rqe_count_1,
11046 &rq_create->u.request.context, 11056 &rq_create->u.request.context, hrq->entry_count);
11047 hrq->entry_count);
11048 rq_create->u.request.context.buffer_size = LPFC_DATA_BUF_SIZE; 11057 rq_create->u.request.context.buffer_size = LPFC_DATA_BUF_SIZE;
11058 bf_set(lpfc_rq_context_rqe_size, &rq_create->u.request.context,
11059 LPFC_RQE_SIZE_8);
11060 bf_set(lpfc_rq_context_page_size, &rq_create->u.request.context,
11061 (PAGE_SIZE/SLI4_PAGE_SIZE));
11049 } else { 11062 } else {
11050 switch (drq->entry_count) { 11063 switch (drq->entry_count) {
11051 default: 11064 default: