Commit b06a622f authored by James Smart's avatar James Smart Committed by Martin K. Petersen

scsi: lpfc: Fix NVME CMD IU byte swapped word 1 problem

Word 1 in NVME CMD IU appears byte swapped from value placed in WQE
Should be Big Endian value in WQE word 16
Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 8b361639
...@@ -620,15 +620,15 @@ lpfc_nvme_adj_fcp_sgls(struct lpfc_vport *vport, ...@@ -620,15 +620,15 @@ lpfc_nvme_adj_fcp_sgls(struct lpfc_vport *vport,
* Embed the payload in the last half of the WQE * Embed the payload in the last half of the WQE
* WQE words 16-30 get the NVME CMD IU payload * WQE words 16-30 get the NVME CMD IU payload
* *
* WQE Word 16 is already setup with flags * WQE words 16-19 get payload Words 1-4
* WQE words 17-19 get payload Words 2-4
* WQE words 20-21 get payload Words 6-7 * WQE words 20-21 get payload Words 6-7
* WQE words 22-29 get payload Words 16-23 * WQE words 22-29 get payload Words 16-23
*/ */
wptr = &wqe->words[17]; /* WQE ptr */ wptr = &wqe->words[16]; /* WQE ptr */
dptr = (uint32_t *)nCmd->cmdaddr; /* payload ptr */ dptr = (uint32_t *)nCmd->cmdaddr; /* payload ptr */
dptr += 2; /* Skip Words 0-1 in payload */ dptr++; /* Skip Word 0 in payload */
*wptr++ = *dptr++; /* Word 1 */
*wptr++ = *dptr++; /* Word 2 */ *wptr++ = *dptr++; /* Word 2 */
*wptr++ = *dptr++; /* Word 3 */ *wptr++ = *dptr++; /* Word 3 */
*wptr++ = *dptr++; /* Word 4 */ *wptr++ = *dptr++; /* Word 4 */
...@@ -978,9 +978,6 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport, ...@@ -978,9 +978,6 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport,
bf_set(wqe_cmd_type, &wqe->generic.wqe_com, bf_set(wqe_cmd_type, &wqe->generic.wqe_com,
NVME_WRITE_CMD); NVME_WRITE_CMD);
/* Word 16 */
wqe->words[16] = LPFC_NVME_EMBED_WRITE;
phba->fc4NvmeOutputRequests++; phba->fc4NvmeOutputRequests++;
} else { } else {
/* Word 7 */ /* Word 7 */
...@@ -1002,9 +999,6 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport, ...@@ -1002,9 +999,6 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport,
bf_set(wqe_cmd_type, &wqe->generic.wqe_com, bf_set(wqe_cmd_type, &wqe->generic.wqe_com,
NVME_READ_CMD); NVME_READ_CMD);
/* Word 16 */
wqe->words[16] = LPFC_NVME_EMBED_READ;
phba->fc4NvmeInputRequests++; phba->fc4NvmeInputRequests++;
} }
} else { } else {
...@@ -1026,9 +1020,6 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport, ...@@ -1026,9 +1020,6 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport,
/* Word 11 */ /* Word 11 */
bf_set(wqe_cmd_type, &wqe->generic.wqe_com, NVME_READ_CMD); bf_set(wqe_cmd_type, &wqe->generic.wqe_com, NVME_READ_CMD);
/* Word 16 */
wqe->words[16] = LPFC_NVME_EMBED_CMD;
phba->fc4NvmeControlRequests++; phba->fc4NvmeControlRequests++;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment