aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRanjan Kumar <[email protected]>2023-02-28 06:08:34 -0800
committerMartin K. Petersen <[email protected]>2023-03-06 18:33:13 -0500
commit4f297e856a7b5da2f2c66a12e739666e23943560 (patch)
tree40c049ed7f22eb3188fb617bce915e937bd77679
parentba8a9ba41fbde250fd8b0ed1e5dad0dc9318df46 (diff)
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 <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/mpi3mr/mpi3mr_app.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
index bff637702397..d10c6afb7f9c 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_app.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_app.c
@@ -886,7 +886,7 @@ static int mpi3mr_build_nvme_prp(struct mpi3mr_ioc *mrioc,
* each time through the loop.
*/
*prp_entry = cpu_to_le64(dma_addr);
- if (*prp1_entry & sgemod_mask) {
+ if (*prp_entry & sgemod_mask) {
dprint_bsg_err(mrioc,
"%s: PRP address collides with SGE modifier\n",
__func__);
@@ -895,7 +895,7 @@ static int mpi3mr_build_nvme_prp(struct mpi3mr_ioc *mrioc,
*prp_entry &= ~sgemod_mask;
*prp_entry |= sgemod_val;
prp_entry++;
- prp_entry_dma++;
+ prp_entry_dma += prp_size;
}
/*