nvme: set dma alignment to dword
authorKeith Busch <kbusch@kernel.org>
Wed, 4 May 2022 18:43:25 +0000 (11:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:58 +0000 (10:22 +0200)
commitb5518b9b41f1d88afd4ebcfe8b776396489a0ff5
treef1da59fd12fabd4f5cccce0ffd32efcc71c38a1f
parentce237c1e252d0dac506c93c9818f8085185355be
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@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c