* [PATCH] lpfc: Correct BDE DMA address assignment for GEN_REQ_WQE
@ 2022-05-06 20:55 James Smart
2022-05-11 2:38 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: James Smart @ 2022-05-06 20:55 UTC (permalink / raw)
To: linux-scsi; +Cc: James Smart, Justin Tee
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.
Fixes: 61910d6a5243 ("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>
---
drivers/scsi/lpfc/lpfc_sli.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 79d2ef5f0f05..6ed696c4602a 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -10728,10 +10728,10 @@ __lpfc_sli_prep_gen_req_s4(struct lpfc_iocbq *cmdiocbq, struct lpfc_dmabuf *bmp,
/* Words 0 - 2 */
bde = (struct ulp_bde64_le *)&cmdwqe->generic.bde;
- bde->addr_low = cpu_to_le32(putPaddrLow(bmp->phys));
- bde->addr_high = cpu_to_le32(putPaddrHigh(bmp->phys));
+ bde->addr_low = bpl->addr_low;
+ bde->addr_high = bpl->addr_high;
bde->type_size = cpu_to_le32(xmit_len);
- bde->type_size |= cpu_to_le32(ULP_BDE64_TYPE_BLP_64);
+ bde->type_size |= cpu_to_le32(ULP_BDE64_TYPE_BDE_64);
/* Word 3 */
cmdwqe->gen_req.request_payload_len = xmit_len;
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] lpfc: Correct BDE DMA address assignment for GEN_REQ_WQE
2022-05-06 20:55 [PATCH] lpfc: Correct BDE DMA address assignment for GEN_REQ_WQE James Smart
@ 2022-05-11 2:38 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2022-05-11 2:38 UTC (permalink / raw)
To: James Smart, linux-scsi; +Cc: Martin K . Petersen, Justin Tee
On Fri, 6 May 2022 13:55:48 -0700, James Smart wrote:
> 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.
>
> [...]
Applied to 5.18/scsi-fixes, thanks!
[1/1] lpfc: Correct BDE DMA address assignment for GEN_REQ_WQE
https://git.kernel.org/mkp/scsi/c/775266207105
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-11 2:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-06 20:55 [PATCH] lpfc: Correct BDE DMA address assignment for GEN_REQ_WQE James Smart
2022-05-11 2:38 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox