Skip to content

Commit 7752662

Browse files
jsmart-ghmartinkpetersen
authored andcommitted
scsi: lpfc: Correct BDE DMA address assignment for GEN_REQ_WQE
Garbage FCoE CT frames are transmitted on the wire because of bad DMA ptr addresses filled in the GEN_REQ_WQE. The __lpfc_sli_prep_gen_req_s4() routine is using the wrong buffer for the payload address. Change the DMA buffer assignment from the bmp buffer to the bpl buffer. Link: https://lore.kernel.org/r/20220506205548.61644-1-jsmart2021@gmail.com Fixes: 61910d6 ("scsi: lpfc: SLI path split: Refactor CT paths") Co-developed-by: Justin Tee <justin.tee@broadcom.com> Signed-off-by: Justin Tee <justin.tee@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent cc28fac commit 7752662

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/scsi/lpfc/lpfc_sli.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10720,10 +10720,10 @@ __lpfc_sli_prep_gen_req_s4(struct lpfc_iocbq *cmdiocbq, struct lpfc_dmabuf *bmp,
1072010720

1072110721
/* Words 0 - 2 */
1072210722
bde = (struct ulp_bde64_le *)&cmdwqe->generic.bde;
10723-
bde->addr_low = cpu_to_le32(putPaddrLow(bmp->phys));
10724-
bde->addr_high = cpu_to_le32(putPaddrHigh(bmp->phys));
10723+
bde->addr_low = bpl->addr_low;
10724+
bde->addr_high = bpl->addr_high;
1072510725
bde->type_size = cpu_to_le32(xmit_len);
10726-
bde->type_size |= cpu_to_le32(ULP_BDE64_TYPE_BLP_64);
10726+
bde->type_size |= cpu_to_le32(ULP_BDE64_TYPE_BDE_64);
1072710727

1072810728
/* Word 3 */
1072910729
cmdwqe->gen_req.request_payload_len = xmit_len;

0 commit comments

Comments
 (0)