From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Tue, 22 Aug 2017 08:15:09 -0700 Subject: [U-Boot] [PATCH 04/14] nvme: Fix endianness assignment to prp2 in nvme_identify() In-Reply-To: <1503414919-30820-1-git-send-email-bmeng.cn@gmail.com> References: <1503414919-30820-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1503414919-30820-5-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de So far this is not causing any issue due to NVMe and x86 are using the same endianness, but for correctness, it should be fixed. Signed-off-by: Bin Meng --- drivers/nvme/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index 5d39cab..2ae947c 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -431,7 +431,7 @@ int nvme_identify(struct nvme_dev *dev, unsigned nsid, c.identify.prp2 = 0; } else { dma_addr += (page_size - offset); - c.identify.prp2 = dma_addr; + c.identify.prp2 = cpu_to_le64(dma_addr); } c.identify.cns = cpu_to_le32(cns); -- 2.9.2