summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2017-08-22 18:15:09 +0300
committerTom Rini <trini@konsulko.com>2017-08-28 14:17:11 +0300
commit3e18562961933c7772b7e91ba6fc1e908b453d93 (patch)
tree208fba4fa4caf32729c046664620e25252e2dd5a /drivers/nvme
parent099c2015b02352df9c829acbdc3d8e6e683011a5 (diff)
downloadu-boot-3e18562961933c7772b7e91ba6fc1e908b453d93.tar.xz
nvme: Fix endianness assignment to prp2 in nvme_identify()
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 <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/nvme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index 5d39cab90d..2ae947c672 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);