]> Git Repo - linux.git/commitdiff
nvme: set dma alignment to dword
authorKeith Busch <[email protected]>
Wed, 4 May 2022 18:43:25 +0000 (11:43 -0700)
committerChristoph Hellwig <[email protected]>
Mon, 16 May 2022 06:06:58 +0000 (08:06 +0200)
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
drivers/nvme/host/core.c

index f41b2b18fad9fd40540a5aa9026b6d501377624d..9a6fb071d986eb8218e1dc5c0823fb89bd6acb18 100644 (file)
@@ -1773,7 +1773,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);
 }
 
This page took 0.066776 seconds and 4 git commands to generate.