Skip to content

Commit b5518b9

Browse files
keithbuschgregkh
authored andcommitted
nvme: set dma alignment to dword
[ Upstream commit 52fde2c ] 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: 3b2a1eb ("nvme: set dma alignment to qword") Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent ce237c1 commit b5518b9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/nvme/host/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl,
17771777
blk_queue_max_segments(q, min_t(u32, max_segments, USHRT_MAX));
17781778
}
17791779
blk_queue_virt_boundary(q, NVME_CTRL_PAGE_SIZE - 1);
1780-
blk_queue_dma_alignment(q, 7);
1780+
blk_queue_dma_alignment(q, 3);
17811781
blk_queue_write_cache(q, vwc, vwc);
17821782
}
17831783

0 commit comments

Comments
 (0)