Skip to content

Commit 4f297e8

Browse files
Ranjan Kumarmartinkpetersen
authored andcommitted
scsi: mpi3mr: NVMe command size greater than 8K fails
A wrong variable is checked while populating PRP entries in the PRP page and this results in failure. No PRP entries in the PRP page were successfully created and any NVMe Encapsulated commands with PRP of size greater than 8K failed. Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com> Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Link: https://lore.kernel.org/r/20230228140835.4075-6-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent ba8a9ba commit 4f297e8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/scsi/mpi3mr/mpi3mr_app.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ static int mpi3mr_build_nvme_prp(struct mpi3mr_ioc *mrioc,
886886
* each time through the loop.
887887
*/
888888
*prp_entry = cpu_to_le64(dma_addr);
889-
if (*prp1_entry & sgemod_mask) {
889+
if (*prp_entry & sgemod_mask) {
890890
dprint_bsg_err(mrioc,
891891
"%s: PRP address collides with SGE modifier\n",
892892
__func__);
@@ -895,7 +895,7 @@ static int mpi3mr_build_nvme_prp(struct mpi3mr_ioc *mrioc,
895895
*prp_entry &= ~sgemod_mask;
896896
*prp_entry |= sgemod_val;
897897
prp_entry++;
898-
prp_entry_dma++;
898+
prp_entry_dma += prp_size;
899899
}
900900

901901
/*

0 commit comments

Comments
 (0)