Patch "scsi: mpi3mr: NVMe command size greater than 8K fails" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: mpi3mr: NVMe command size greater than 8K fails

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-mpi3mr-nvme-command-size-greater-than-8k-fails.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9975ad81a51fad281793c4fe68ae4b945cda7a91
Author: Ranjan Kumar <ranjan.kumar@xxxxxxxxxxxx>
Date:   Tue Feb 28 06:08:34 2023 -0800

    scsi: mpi3mr: NVMe command size greater than 8K fails
    
    [ Upstream commit 4f297e856a7b5da2f2c66a12e739666e23943560 ]
    
    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@xxxxxxxxxxxx>
    Signed-off-by: Sreekanth Reddy <sreekanth.reddy@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230228140835.4075-6-ranjan.kumar@xxxxxxxxxxxx
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c
index bff6377023979..d10c6afb7f9cd 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;
 		}
 
 		/*



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux