diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 228 |
1 files changed, 121 insertions, 107 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index ce4145377efd..554efa6623f4 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -95,7 +95,7 @@ lpfc_sli4_wq_put(struct lpfc_queue *q, union lpfc_wqe *wqe) | |||
95 | return -ENOMEM; | 95 | return -ENOMEM; |
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(lpfc_wqe_gen_wqec, &wqe->generic, 1); | 98 | bf_set(wqe_wqec, &wqe->generic.wqe_com, 1); |
99 | 99 | ||
100 | lpfc_sli_pcimem_bcopy(wqe, temp_wqe, q->entry_size); | 100 | lpfc_sli_pcimem_bcopy(wqe, temp_wqe, q->entry_size); |
101 | 101 | ||
@@ -5965,7 +5965,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, | |||
5965 | uint16_t abrt_iotag; | 5965 | uint16_t abrt_iotag; |
5966 | struct lpfc_iocbq *abrtiocbq; | 5966 | struct lpfc_iocbq *abrtiocbq; |
5967 | struct ulp_bde64 *bpl = NULL; | 5967 | struct ulp_bde64 *bpl = NULL; |
5968 | uint32_t els_id = ELS_ID_DEFAULT; | 5968 | uint32_t els_id = LPFC_ELS_ID_DEFAULT; |
5969 | int numBdes, i; | 5969 | int numBdes, i; |
5970 | struct ulp_bde64 bde; | 5970 | struct ulp_bde64 bde; |
5971 | 5971 | ||
@@ -5982,7 +5982,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, | |||
5982 | memcpy(wqe, &iocbq->iocb, sizeof(union lpfc_wqe)); | 5982 | memcpy(wqe, &iocbq->iocb, sizeof(union lpfc_wqe)); |
5983 | abort_tag = (uint32_t) iocbq->iotag; | 5983 | abort_tag = (uint32_t) iocbq->iotag; |
5984 | xritag = iocbq->sli4_xritag; | 5984 | xritag = iocbq->sli4_xritag; |
5985 | wqe->words[7] = 0; /* The ct field has moved so reset */ | 5985 | wqe->generic.wqe_com.word7 = 0; /* The ct field has moved so reset */ |
5986 | /* words0-2 bpl convert bde */ | 5986 | /* words0-2 bpl convert bde */ |
5987 | if (iocbq->iocb.un.genreq64.bdl.bdeFlags == BUFF_TYPE_BLP_64) { | 5987 | if (iocbq->iocb.un.genreq64.bdl.bdeFlags == BUFF_TYPE_BLP_64) { |
5988 | numBdes = iocbq->iocb.un.genreq64.bdl.bdeSize / | 5988 | numBdes = iocbq->iocb.un.genreq64.bdl.bdeSize / |
@@ -6033,109 +6033,117 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, | |||
6033 | * contains the FCFI and remote N_Port_ID is | 6033 | * contains the FCFI and remote N_Port_ID is |
6034 | * in word 5. | 6034 | * in word 5. |
6035 | */ | 6035 | */ |
6036 | |||
6037 | ct = ((iocbq->iocb.ulpCt_h << 1) | iocbq->iocb.ulpCt_l); | 6036 | ct = ((iocbq->iocb.ulpCt_h << 1) | iocbq->iocb.ulpCt_l); |
6038 | bf_set(lpfc_wqe_gen_context, &wqe->generic, | 6037 | bf_set(wqe_ctxt_tag, &wqe->els_req.wqe_com, |
6039 | iocbq->iocb.ulpContext); | 6038 | iocbq->iocb.ulpContext); |
6040 | 6039 | bf_set(wqe_ct, &wqe->els_req.wqe_com, ct); | |
6041 | bf_set(lpfc_wqe_gen_ct, &wqe->generic, ct); | 6040 | bf_set(wqe_pu, &wqe->els_req.wqe_com, 0); |
6042 | bf_set(lpfc_wqe_gen_pu, &wqe->generic, 0); | ||
6043 | /* CCP CCPE PV PRI in word10 were set in the memcpy */ | 6041 | /* CCP CCPE PV PRI in word10 were set in the memcpy */ |
6044 | |||
6045 | if (command_type == ELS_COMMAND_FIP) { | 6042 | if (command_type == ELS_COMMAND_FIP) { |
6046 | els_id = ((iocbq->iocb_flag & LPFC_FIP_ELS_ID_MASK) | 6043 | els_id = ((iocbq->iocb_flag & LPFC_FIP_ELS_ID_MASK) |
6047 | >> LPFC_FIP_ELS_ID_SHIFT); | 6044 | >> LPFC_FIP_ELS_ID_SHIFT); |
6048 | } | 6045 | } |
6049 | bf_set(lpfc_wqe_gen_els_id, &wqe->generic, els_id); | 6046 | bf_set(wqe_els_id, &wqe->els_req.wqe_com, els_id); |
6050 | 6047 | bf_set(wqe_dbde, &wqe->els_req.wqe_com, 1); | |
6048 | bf_set(wqe_iod, &wqe->els_req.wqe_com, LPFC_WQE_IOD_READ); | ||
6049 | bf_set(wqe_qosd, &wqe->els_req.wqe_com, 1); | ||
6050 | bf_set(wqe_lenloc, &wqe->els_req.wqe_com, LPFC_WQE_LENLOC_NONE); | ||
6051 | bf_set(wqe_ebde_cnt, &wqe->els_req.wqe_com, 0); | ||
6051 | break; | 6052 | break; |
6052 | case CMD_XMIT_SEQUENCE64_CX: | 6053 | case CMD_XMIT_SEQUENCE64_CX: |
6053 | bf_set(lpfc_wqe_gen_context, &wqe->generic, | 6054 | bf_set(wqe_ctxt_tag, &wqe->xmit_sequence.wqe_com, |
6054 | iocbq->iocb.un.ulpWord[3]); | 6055 | iocbq->iocb.un.ulpWord[3]); |
6055 | wqe->generic.word3 = 0; | 6056 | bf_set(wqe_rcvoxid, &wqe->xmit_sequence.wqe_com, |
6056 | bf_set(wqe_rcvoxid, &wqe->generic, iocbq->iocb.ulpContext); | 6057 | iocbq->iocb.ulpContext); |
6057 | /* The entire sequence is transmitted for this IOCB */ | 6058 | /* The entire sequence is transmitted for this IOCB */ |
6058 | xmit_len = total_len; | 6059 | xmit_len = total_len; |
6059 | cmnd = CMD_XMIT_SEQUENCE64_CR; | 6060 | cmnd = CMD_XMIT_SEQUENCE64_CR; |
6060 | case CMD_XMIT_SEQUENCE64_CR: | 6061 | case CMD_XMIT_SEQUENCE64_CR: |
6061 | /* word3 iocb=io_tag32 wqe=payload_offset */ | 6062 | /* word3 iocb=io_tag32 wqe=reserved */ |
6062 | /* payload offset used for multilpe outstanding | 6063 | wqe->xmit_sequence.rsvd3 = 0; |
6063 | * sequences on the same exchange | ||
6064 | */ | ||
6065 | wqe->words[3] = 0; | ||
6066 | /* word4 relative_offset memcpy */ | 6064 | /* word4 relative_offset memcpy */ |
6067 | /* word5 r_ctl/df_ctl memcpy */ | 6065 | /* word5 r_ctl/df_ctl memcpy */ |
6068 | bf_set(lpfc_wqe_gen_pu, &wqe->generic, 0); | 6066 | bf_set(wqe_pu, &wqe->xmit_sequence.wqe_com, 0); |
6067 | bf_set(wqe_dbde, &wqe->xmit_sequence.wqe_com, 1); | ||
6068 | bf_set(wqe_iod, &wqe->xmit_sequence.wqe_com, | ||
6069 | LPFC_WQE_IOD_WRITE); | ||
6070 | bf_set(wqe_lenloc, &wqe->xmit_sequence.wqe_com, | ||
6071 | LPFC_WQE_LENLOC_WORD12); | ||
6072 | bf_set(wqe_ebde_cnt, &wqe->xmit_sequence.wqe_com, 0); | ||
6069 | wqe->xmit_sequence.xmit_len = xmit_len; | 6073 | wqe->xmit_sequence.xmit_len = xmit_len; |
6070 | command_type = OTHER_COMMAND; | 6074 | command_type = OTHER_COMMAND; |
6071 | break; | 6075 | break; |
6072 | case CMD_XMIT_BCAST64_CN: | 6076 | case CMD_XMIT_BCAST64_CN: |
6073 | /* word3 iocb=iotag32 wqe=payload_len */ | 6077 | /* word3 iocb=iotag32 wqe=seq_payload_len */ |
6074 | wqe->words[3] = 0; /* no definition for this in wqe */ | 6078 | wqe->xmit_bcast64.seq_payload_len = xmit_len; |
6075 | /* word4 iocb=rsvd wqe=rsvd */ | 6079 | /* word4 iocb=rsvd wqe=rsvd */ |
6076 | /* word5 iocb=rctl/type/df_ctl wqe=rctl/type/df_ctl memcpy */ | 6080 | /* word5 iocb=rctl/type/df_ctl wqe=rctl/type/df_ctl memcpy */ |
6077 | /* word6 iocb=ctxt_tag/io_tag wqe=ctxt_tag/xri */ | 6081 | /* word6 iocb=ctxt_tag/io_tag wqe=ctxt_tag/xri */ |
6078 | bf_set(lpfc_wqe_gen_ct, &wqe->generic, | 6082 | bf_set(wqe_ct, &wqe->xmit_bcast64.wqe_com, |
6079 | ((iocbq->iocb.ulpCt_h << 1) | iocbq->iocb.ulpCt_l)); | 6083 | ((iocbq->iocb.ulpCt_h << 1) | iocbq->iocb.ulpCt_l)); |
6084 | bf_set(wqe_dbde, &wqe->xmit_bcast64.wqe_com, 1); | ||
6085 | bf_set(wqe_iod, &wqe->xmit_bcast64.wqe_com, LPFC_WQE_IOD_WRITE); | ||
6086 | bf_set(wqe_lenloc, &wqe->xmit_bcast64.wqe_com, | ||
6087 | LPFC_WQE_LENLOC_WORD3); | ||
6088 | bf_set(wqe_ebde_cnt, &wqe->xmit_bcast64.wqe_com, 0); | ||
6080 | break; | 6089 | break; |
6081 | case CMD_FCP_IWRITE64_CR: | 6090 | case CMD_FCP_IWRITE64_CR: |
6082 | command_type = FCP_COMMAND_DATA_OUT; | 6091 | command_type = FCP_COMMAND_DATA_OUT; |
6083 | /* The struct for wqe fcp_iwrite has 3 fields that are somewhat | 6092 | /* word3 iocb=iotag wqe=payload_offset_len */ |
6084 | * confusing. | 6093 | /* Add the FCP_CMD and FCP_RSP sizes to get the offset */ |
6085 | * word3 is payload_len: byte offset to the sgl entry for the | 6094 | wqe->fcp_iwrite.payload_offset_len = |
6086 | * fcp_command. | 6095 | xmit_len + sizeof(struct fcp_rsp); |
6087 | * word4 is total xfer len, same as the IOCB->ulpParameter. | 6096 | /* word4 iocb=parameter wqe=total_xfer_length memcpy */ |
6088 | * word5 is initial xfer len 0 = wait for xfer-ready | 6097 | /* word5 iocb=initial_xfer_len wqe=initial_xfer_len memcpy */ |
6089 | */ | 6098 | bf_set(wqe_erp, &wqe->fcp_iwrite.wqe_com, |
6090 | 6099 | iocbq->iocb.ulpFCP2Rcvy); | |
6091 | /* Always wait for xfer-ready before sending data */ | 6100 | bf_set(wqe_lnk, &wqe->fcp_iwrite.wqe_com, iocbq->iocb.ulpXS); |
6092 | wqe->fcp_iwrite.initial_xfer_len = 0; | 6101 | /* Always open the exchange */ |
6093 | /* word 4 (xfer length) should have been set on the memcpy */ | 6102 | bf_set(wqe_xc, &wqe->fcp_iwrite.wqe_com, 0); |
6094 | 6103 | bf_set(wqe_dbde, &wqe->fcp_iwrite.wqe_com, 1); | |
6095 | /* allow write to fall through to read */ | 6104 | bf_set(wqe_iod, &wqe->fcp_iwrite.wqe_com, LPFC_WQE_IOD_WRITE); |
6105 | bf_set(wqe_lenloc, &wqe->fcp_iwrite.wqe_com, | ||
6106 | LPFC_WQE_LENLOC_WORD4); | ||
6107 | bf_set(wqe_ebde_cnt, &wqe->fcp_iwrite.wqe_com, 0); | ||
6108 | bf_set(wqe_pu, &wqe->fcp_iwrite.wqe_com, iocbq->iocb.ulpPU); | ||
6109 | break; | ||
6096 | case CMD_FCP_IREAD64_CR: | 6110 | case CMD_FCP_IREAD64_CR: |
6097 | /* FCP_CMD is always the 1st sgl entry */ | 6111 | /* word3 iocb=iotag wqe=payload_offset_len */ |
6098 | wqe->fcp_iread.payload_len = | 6112 | /* Add the FCP_CMD and FCP_RSP sizes to get the offset */ |
6113 | wqe->fcp_iread.payload_offset_len = | ||
6099 | xmit_len + sizeof(struct fcp_rsp); | 6114 | xmit_len + sizeof(struct fcp_rsp); |
6100 | 6115 | /* word4 iocb=parameter wqe=total_xfer_length memcpy */ | |
6101 | /* word 4 (xfer length) should have been set on the memcpy */ | 6116 | /* word5 iocb=initial_xfer_len wqe=initial_xfer_len memcpy */ |
6102 | 6117 | bf_set(wqe_erp, &wqe->fcp_iread.wqe_com, | |
6103 | bf_set(lpfc_wqe_gen_erp, &wqe->generic, | 6118 | iocbq->iocb.ulpFCP2Rcvy); |
6104 | iocbq->iocb.ulpFCP2Rcvy); | 6119 | bf_set(wqe_lnk, &wqe->fcp_iread.wqe_com, iocbq->iocb.ulpXS); |
6105 | bf_set(lpfc_wqe_gen_lnk, &wqe->generic, iocbq->iocb.ulpXS); | ||
6106 | /* The XC bit and the XS bit are similar. The driver never | ||
6107 | * tracked whether or not the exchange was previouslly open. | ||
6108 | * XC = Exchange create, 0 is create. 1 is already open. | ||
6109 | * XS = link cmd: 1 do not close the exchange after command. | ||
6110 | * XS = 0 close exchange when command completes. | ||
6111 | * The only time we would not set the XC bit is when the XS bit | ||
6112 | * is set and we are sending our 2nd or greater command on | ||
6113 | * this exchange. | ||
6114 | */ | ||
6115 | /* Always open the exchange */ | 6120 | /* Always open the exchange */ |
6116 | bf_set(wqe_xc, &wqe->fcp_iread.wqe_com, 0); | 6121 | bf_set(wqe_xc, &wqe->fcp_iread.wqe_com, 0); |
6117 | 6122 | bf_set(wqe_dbde, &wqe->fcp_iread.wqe_com, 1); | |
6118 | wqe->words[10] &= 0xffff0000; /* zero out ebde count */ | 6123 | bf_set(wqe_iod, &wqe->fcp_iread.wqe_com, LPFC_WQE_IOD_READ); |
6119 | bf_set(lpfc_wqe_gen_pu, &wqe->generic, iocbq->iocb.ulpPU); | 6124 | bf_set(wqe_lenloc, &wqe->fcp_iread.wqe_com, |
6120 | break; | 6125 | LPFC_WQE_LENLOC_WORD4); |
6126 | bf_set(wqe_ebde_cnt, &wqe->fcp_iread.wqe_com, 0); | ||
6127 | bf_set(wqe_pu, &wqe->fcp_iread.wqe_com, iocbq->iocb.ulpPU); | ||
6128 | break; | ||
6121 | case CMD_FCP_ICMND64_CR: | 6129 | case CMD_FCP_ICMND64_CR: |
6130 | /* word3 iocb=IO_TAG wqe=reserved */ | ||
6131 | wqe->fcp_icmd.rsrvd3 = 0; | ||
6132 | bf_set(wqe_pu, &wqe->fcp_icmd.wqe_com, 0); | ||
6122 | /* Always open the exchange */ | 6133 | /* Always open the exchange */ |
6123 | bf_set(wqe_xc, &wqe->fcp_iread.wqe_com, 0); | 6134 | bf_set(wqe_xc, &wqe->fcp_icmd.wqe_com, 0); |
6124 | 6135 | bf_set(wqe_dbde, &wqe->fcp_icmd.wqe_com, 1); | |
6125 | wqe->words[4] = 0; | 6136 | bf_set(wqe_iod, &wqe->fcp_icmd.wqe_com, LPFC_WQE_IOD_WRITE); |
6126 | wqe->words[10] &= 0xffff0000; /* zero out ebde count */ | 6137 | bf_set(wqe_qosd, &wqe->fcp_icmd.wqe_com, 1); |
6127 | bf_set(lpfc_wqe_gen_pu, &wqe->generic, 0); | 6138 | bf_set(wqe_lenloc, &wqe->fcp_icmd.wqe_com, |
6139 | LPFC_WQE_LENLOC_NONE); | ||
6140 | bf_set(wqe_ebde_cnt, &wqe->fcp_icmd.wqe_com, 0); | ||
6128 | break; | 6141 | break; |
6129 | case CMD_GEN_REQUEST64_CR: | 6142 | case CMD_GEN_REQUEST64_CR: |
6130 | /* word3 command length is described as byte offset to the | 6143 | /* word3 iocb=IO_TAG wqe=request_payload_len */ |
6131 | * rsp_data. Would always be 16, sizeof(struct sli4_sge) | 6144 | wqe->gen_req.request_payload_len = xmit_len; |
6132 | * sgl[0] = cmnd | 6145 | /* word4 iocb=parameter wqe=relative_offset memcpy */ |
6133 | * sgl[1] = rsp. | 6146 | /* word5 [rctl, type, df_ctl, la] copied in memcpy */ |
6134 | * | ||
6135 | */ | ||
6136 | wqe->gen_req.command_len = xmit_len; | ||
6137 | /* Word4 parameter copied in the memcpy */ | ||
6138 | /* Word5 [rctl, type, df_ctl, la] copied in memcpy */ | ||
6139 | /* word6 context tag copied in memcpy */ | 6147 | /* word6 context tag copied in memcpy */ |
6140 | if (iocbq->iocb.ulpCt_h || iocbq->iocb.ulpCt_l) { | 6148 | if (iocbq->iocb.ulpCt_h || iocbq->iocb.ulpCt_l) { |
6141 | ct = ((iocbq->iocb.ulpCt_h << 1) | iocbq->iocb.ulpCt_l); | 6149 | ct = ((iocbq->iocb.ulpCt_h << 1) | iocbq->iocb.ulpCt_l); |
@@ -6144,31 +6152,39 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, | |||
6144 | ct, iocbq->iocb.ulpCommand); | 6152 | ct, iocbq->iocb.ulpCommand); |
6145 | return IOCB_ERROR; | 6153 | return IOCB_ERROR; |
6146 | } | 6154 | } |
6147 | bf_set(lpfc_wqe_gen_ct, &wqe->generic, 0); | 6155 | bf_set(wqe_ct, &wqe->gen_req.wqe_com, 0); |
6148 | bf_set(wqe_tmo, &wqe->gen_req.wqe_com, | 6156 | bf_set(wqe_tmo, &wqe->gen_req.wqe_com, iocbq->iocb.ulpTimeout); |
6149 | iocbq->iocb.ulpTimeout); | 6157 | bf_set(wqe_pu, &wqe->gen_req.wqe_com, iocbq->iocb.ulpPU); |
6150 | 6158 | bf_set(wqe_dbde, &wqe->gen_req.wqe_com, 1); | |
6151 | bf_set(lpfc_wqe_gen_pu, &wqe->generic, iocbq->iocb.ulpPU); | 6159 | bf_set(wqe_iod, &wqe->gen_req.wqe_com, LPFC_WQE_IOD_READ); |
6160 | bf_set(wqe_qosd, &wqe->gen_req.wqe_com, 1); | ||
6161 | bf_set(wqe_lenloc, &wqe->gen_req.wqe_com, LPFC_WQE_LENLOC_NONE); | ||
6162 | bf_set(wqe_ebde_cnt, &wqe->gen_req.wqe_com, 0); | ||
6152 | command_type = OTHER_COMMAND; | 6163 | command_type = OTHER_COMMAND; |
6153 | break; | 6164 | break; |
6154 | case CMD_XMIT_ELS_RSP64_CX: | 6165 | case CMD_XMIT_ELS_RSP64_CX: |
6155 | /* words0-2 BDE memcpy */ | 6166 | /* words0-2 BDE memcpy */ |
6156 | /* word3 iocb=iotag32 wqe=rsvd */ | 6167 | /* word3 iocb=iotag32 wqe=response_payload_len */ |
6157 | wqe->words[3] = 0; | 6168 | wqe->xmit_els_rsp.response_payload_len = xmit_len; |
6158 | /* word4 iocb=did wge=rsvd. */ | 6169 | /* word4 iocb=did wge=rsvd. */ |
6159 | wqe->words[4] = 0; | 6170 | wqe->xmit_els_rsp.rsvd4 = 0; |
6160 | /* word5 iocb=rsvd wge=did */ | 6171 | /* word5 iocb=rsvd wge=did */ |
6161 | bf_set(wqe_els_did, &wqe->xmit_els_rsp.wqe_dest, | 6172 | bf_set(wqe_els_did, &wqe->xmit_els_rsp.wqe_dest, |
6162 | iocbq->iocb.un.elsreq64.remoteID); | 6173 | iocbq->iocb.un.elsreq64.remoteID); |
6163 | 6174 | bf_set(wqe_ct, &wqe->xmit_els_rsp.wqe_com, | |
6164 | bf_set(lpfc_wqe_gen_ct, &wqe->generic, | 6175 | ((iocbq->iocb.ulpCt_h << 1) | iocbq->iocb.ulpCt_l)); |
6165 | ((iocbq->iocb.ulpCt_h << 1) | iocbq->iocb.ulpCt_l)); | 6176 | bf_set(wqe_pu, &wqe->xmit_els_rsp.wqe_com, iocbq->iocb.ulpPU); |
6166 | 6177 | bf_set(wqe_rcvoxid, &wqe->xmit_els_rsp.wqe_com, | |
6167 | bf_set(lpfc_wqe_gen_pu, &wqe->generic, iocbq->iocb.ulpPU); | 6178 | iocbq->iocb.ulpContext); |
6168 | bf_set(wqe_rcvoxid, &wqe->generic, iocbq->iocb.ulpContext); | ||
6169 | if (!iocbq->iocb.ulpCt_h && iocbq->iocb.ulpCt_l) | 6179 | if (!iocbq->iocb.ulpCt_h && iocbq->iocb.ulpCt_l) |
6170 | bf_set(lpfc_wqe_gen_context, &wqe->generic, | 6180 | bf_set(wqe_ctxt_tag, &wqe->xmit_els_rsp.wqe_com, |
6171 | iocbq->vport->vpi + phba->vpi_base); | 6181 | iocbq->vport->vpi + phba->vpi_base); |
6182 | bf_set(wqe_dbde, &wqe->xmit_els_rsp.wqe_com, 1); | ||
6183 | bf_set(wqe_iod, &wqe->xmit_els_rsp.wqe_com, LPFC_WQE_IOD_WRITE); | ||
6184 | bf_set(wqe_qosd, &wqe->xmit_els_rsp.wqe_com, 1); | ||
6185 | bf_set(wqe_lenloc, &wqe->xmit_els_rsp.wqe_com, | ||
6186 | LPFC_WQE_LENLOC_WORD3); | ||
6187 | bf_set(wqe_ebde_cnt, &wqe->xmit_els_rsp.wqe_com, 0); | ||
6172 | command_type = OTHER_COMMAND; | 6188 | command_type = OTHER_COMMAND; |
6173 | break; | 6189 | break; |
6174 | case CMD_CLOSE_XRI_CN: | 6190 | case CMD_CLOSE_XRI_CN: |
@@ -6193,15 +6209,19 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, | |||
6193 | else | 6209 | else |
6194 | bf_set(abort_cmd_ia, &wqe->abort_cmd, 0); | 6210 | bf_set(abort_cmd_ia, &wqe->abort_cmd, 0); |
6195 | bf_set(abort_cmd_criteria, &wqe->abort_cmd, T_XRI_TAG); | 6211 | bf_set(abort_cmd_criteria, &wqe->abort_cmd, T_XRI_TAG); |
6196 | wqe->words[5] = 0; | 6212 | /* word5 iocb=CONTEXT_TAG|IO_TAG wqe=reserved */ |
6197 | bf_set(lpfc_wqe_gen_ct, &wqe->generic, | 6213 | wqe->abort_cmd.rsrvd5 = 0; |
6214 | bf_set(wqe_ct, &wqe->abort_cmd.wqe_com, | ||
6198 | ((iocbq->iocb.ulpCt_h << 1) | iocbq->iocb.ulpCt_l)); | 6215 | ((iocbq->iocb.ulpCt_h << 1) | iocbq->iocb.ulpCt_l)); |
6199 | abort_tag = iocbq->iocb.un.acxri.abortIoTag; | 6216 | abort_tag = iocbq->iocb.un.acxri.abortIoTag; |
6200 | /* | 6217 | /* |
6201 | * The abort handler will send us CMD_ABORT_XRI_CN or | 6218 | * The abort handler will send us CMD_ABORT_XRI_CN or |
6202 | * CMD_CLOSE_XRI_CN and the fw only accepts CMD_ABORT_XRI_CX | 6219 | * CMD_CLOSE_XRI_CN and the fw only accepts CMD_ABORT_XRI_CX |
6203 | */ | 6220 | */ |
6204 | bf_set(lpfc_wqe_gen_command, &wqe->generic, CMD_ABORT_XRI_CX); | 6221 | bf_set(wqe_cmnd, &wqe->abort_cmd.wqe_com, CMD_ABORT_XRI_CX); |
6222 | bf_set(wqe_qosd, &wqe->abort_cmd.wqe_com, 1); | ||
6223 | bf_set(wqe_lenloc, &wqe->abort_cmd.wqe_com, | ||
6224 | LPFC_WQE_LENLOC_NONE); | ||
6205 | cmnd = CMD_ABORT_XRI_CX; | 6225 | cmnd = CMD_ABORT_XRI_CX; |
6206 | command_type = OTHER_COMMAND; | 6226 | command_type = OTHER_COMMAND; |
6207 | xritag = 0; | 6227 | xritag = 0; |
@@ -6235,18 +6255,14 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, | |||
6235 | bf_set(wqe_xmit_bls_pt, &wqe->xmit_bls_rsp.wqe_dest, 0x1); | 6255 | bf_set(wqe_xmit_bls_pt, &wqe->xmit_bls_rsp.wqe_dest, 0x1); |
6236 | bf_set(wqe_ctxt_tag, &wqe->xmit_bls_rsp.wqe_com, | 6256 | bf_set(wqe_ctxt_tag, &wqe->xmit_bls_rsp.wqe_com, |
6237 | iocbq->iocb.ulpContext); | 6257 | iocbq->iocb.ulpContext); |
6258 | bf_set(wqe_qosd, &wqe->xmit_bls_rsp.wqe_com, 1); | ||
6259 | bf_set(wqe_lenloc, &wqe->xmit_bls_rsp.wqe_com, | ||
6260 | LPFC_WQE_LENLOC_NONE); | ||
6238 | /* Overwrite the pre-set comnd type with OTHER_COMMAND */ | 6261 | /* Overwrite the pre-set comnd type with OTHER_COMMAND */ |
6239 | command_type = OTHER_COMMAND; | 6262 | command_type = OTHER_COMMAND; |
6240 | break; | 6263 | break; |
6241 | case CMD_XRI_ABORTED_CX: | 6264 | case CMD_XRI_ABORTED_CX: |
6242 | case CMD_CREATE_XRI_CR: /* Do we expect to use this? */ | 6265 | case CMD_CREATE_XRI_CR: /* Do we expect to use this? */ |
6243 | /* words0-2 are all 0's no bde */ | ||
6244 | /* word3 and word4 are rsvrd */ | ||
6245 | wqe->words[3] = 0; | ||
6246 | wqe->words[4] = 0; | ||
6247 | /* word5 iocb=rsvd wge=did */ | ||
6248 | /* There is no remote port id in the IOCB? */ | ||
6249 | /* Let this fall through and fail */ | ||
6250 | case CMD_IOCB_FCP_IBIDIR64_CR: /* bidirectional xfer */ | 6266 | case CMD_IOCB_FCP_IBIDIR64_CR: /* bidirectional xfer */ |
6251 | case CMD_FCP_TSEND64_CX: /* Target mode send xfer-ready */ | 6267 | case CMD_FCP_TSEND64_CX: /* Target mode send xfer-ready */ |
6252 | case CMD_FCP_TRSP64_CX: /* Target mode rcv */ | 6268 | case CMD_FCP_TRSP64_CX: /* Target mode rcv */ |
@@ -6257,16 +6273,14 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq, | |||
6257 | iocbq->iocb.ulpCommand); | 6273 | iocbq->iocb.ulpCommand); |
6258 | return IOCB_ERROR; | 6274 | return IOCB_ERROR; |
6259 | break; | 6275 | break; |
6260 | |||
6261 | } | 6276 | } |
6262 | bf_set(lpfc_wqe_gen_xri, &wqe->generic, xritag); | 6277 | bf_set(wqe_xri_tag, &wqe->generic.wqe_com, xritag); |
6263 | bf_set(lpfc_wqe_gen_request_tag, &wqe->generic, iocbq->iotag); | 6278 | bf_set(wqe_reqtag, &wqe->generic.wqe_com, iocbq->iotag); |
6264 | wqe->generic.abort_tag = abort_tag; | 6279 | wqe->generic.wqe_com.abort_tag = abort_tag; |
6265 | bf_set(lpfc_wqe_gen_cmd_type, &wqe->generic, command_type); | 6280 | bf_set(wqe_cmd_type, &wqe->generic.wqe_com, command_type); |
6266 | bf_set(lpfc_wqe_gen_command, &wqe->generic, cmnd); | 6281 | bf_set(wqe_cmnd, &wqe->generic.wqe_com, cmnd); |
6267 | bf_set(lpfc_wqe_gen_class, &wqe->generic, iocbq->iocb.ulpClass); | 6282 | bf_set(wqe_class, &wqe->generic.wqe_com, iocbq->iocb.ulpClass); |
6268 | bf_set(lpfc_wqe_gen_cq_id, &wqe->generic, LPFC_WQE_CQ_ID_DEFAULT); | 6283 | bf_set(wqe_cqid, &wqe->generic.wqe_com, LPFC_WQE_CQ_ID_DEFAULT); |
6269 | |||
6270 | return 0; | 6284 | return 0; |
6271 | } | 6285 | } |
6272 | 6286 | ||