Patch "nvme: set dma alignment to dword" has been added to the 5.15-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

    nvme: set dma alignment to dword

to the 5.15-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:
     nvme-set-dma-alignment-to-dword.patch
and it can be found in the queue-5.15 subdirectory.

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



commit d8859f053df85ac3d0535654bcbca75da87cb911
Author: Keith Busch <kbusch@xxxxxxxxxx>
Date:   Wed May 4 11:43:25 2022 -0700

    nvme: set dma alignment to dword
    
    [ Upstream commit 52fde2c07da606f3f120af4f734eadcfb52b04be ]
    
    The nvme specification only requires qword alignment for segment
    descriptors, and the driver already guarantees that. The spec has always
    allowed user data to be dword aligned, which is what the queue's
    attribute is for, so relax the alignment requirement to that value.
    
    While we could allow byte alignment for some controllers when using
    SGLs, we still need to support PRP, and that only allows dword.
    
    Fixes: 3b2a1ebceba3 ("nvme: set dma alignment to qword")
    Signed-off-by: Keith Busch <kbusch@xxxxxxxxxx>
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 711b89424bd0..af355b9ee5ea 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1777,7 +1777,7 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl,
 		blk_queue_max_segments(q, min_t(u32, max_segments, USHRT_MAX));
 	}
 	blk_queue_virt_boundary(q, NVME_CTRL_PAGE_SIZE - 1);
-	blk_queue_dma_alignment(q, 7);
+	blk_queue_dma_alignment(q, 3);
 	blk_queue_write_cache(q, vwc, vwc);
 }
 



[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