History

nvme: set dma alignment to dword

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.

Keith Busch committed 4 years ago

Commit 52fde2c1 parent 1a869241 file · +1 −1Browse files

Unified · Split

drivers/nvme/host/core.c+1−1
@@ -1773,7 +1773,7 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl, · 1772 unmodified lines
1773 blk_queue_max_segments(q, min_t(u32, max_segments, USHRT_MAX));1773 blk_queue_max_segments(q, min_t(u32, max_segments, USHRT_MAX));
1774 }1774 }
1775 blk_queue_virt_boundary(q, NVME_CTRL_PAGE_SIZE - 1);1775 blk_queue_virt_boundary(q, NVME_CTRL_PAGE_SIZE - 1);
1776 blk_queue_dma_alignment(q, 7);1776 blk_queue_dma_alignment(q, 3);
1777 blk_queue_write_cache(q, vwc, vwc);1777 blk_queue_write_cache(q, vwc, vwc);
1778}1778}
1779 1779