projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf17aa3
)
nvme: add missing byte swap in nvme_setup_discard
author
Christoph Hellwig
<hch@lst.de>
Fri, 31 Mar 2017 15:00:05 +0000
(17:00 +0200)
committer
Sagi Grimberg
<sagi@grimberg.me>
Sun, 2 Apr 2017 07:24:15 +0000
(10:24 +0300)
Fixes:
b35ba01e
("nvme: support ranged discard requests")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/core.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/host/core.c
b/drivers/nvme/host/core.c
index
9b3b57f
..
9583a5f
100644
(file)
--- a/
drivers/nvme/host/core.c
+++ b/
drivers/nvme/host/core.c
@@
-270,7
+270,7
@@
static inline int nvme_setup_discard(struct nvme_ns *ns, struct request *req,
memset(cmnd, 0, sizeof(*cmnd));
cmnd->dsm.opcode = nvme_cmd_dsm;
cmnd->dsm.nsid = cpu_to_le32(ns->ns_id);
- cmnd->dsm.nr =
segments - 1
;
+ cmnd->dsm.nr =
cpu_to_le32(segments - 1)
;
cmnd->dsm.attributes = cpu_to_le32(NVME_DSMGMT_AD);
req->special_vec.bv_page = virt_to_page(range);