Skip to content

Commit

Permalink
Merge branch 'nvme-4.11-rc' of git://git.infradead.org/nvme into for-…
Browse files Browse the repository at this point in the history
…linus

Sagi writes:

We have one spec mis-match fix from Roland and several sparse fixes from
Christoph.
  • Loading branch information
axboe committed Apr 4, 2017
2 parents ac77a0c + 793c7ed commit 8945927
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/nvme/target/admin-cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static u16 nvmet_get_smart_log(struct nvmet_req *req,
u16 status;

WARN_ON(req == NULL || slog == NULL);
if (req->cmd->get_log_page.nsid == 0xFFFFFFFF)
if (req->cmd->get_log_page.nsid == cpu_to_le32(0xFFFFFFFF))
status = nvmet_get_smart_log_all(req, slog);
else
status = nvmet_get_smart_log_nsid(req, slog);
Expand Down
4 changes: 2 additions & 2 deletions drivers/nvme/target/io-cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static void nvmet_execute_write_zeroes(struct nvmet_req *req)

sector = le64_to_cpu(write_zeroes->slba) <<
(req->ns->blksize_shift - 9);
nr_sector = (((sector_t)le32_to_cpu(write_zeroes->length)) <<
nr_sector = (((sector_t)le16_to_cpu(write_zeroes->length)) <<
(req->ns->blksize_shift - 9)) + 1;

if (__blkdev_issue_zeroout(req->ns->bdev, sector, nr_sector,
Expand Down Expand Up @@ -230,7 +230,7 @@ int nvmet_parse_io_cmd(struct nvmet_req *req)
return 0;
case nvme_cmd_dsm:
req->execute = nvmet_execute_dsm;
req->data_len = le32_to_cpu(cmd->dsm.nr + 1) *
req->data_len = (le32_to_cpu(cmd->dsm.nr) + 1) *
sizeof(struct nvme_dsm_range);
return 0;
case nvme_cmd_write_zeroes:
Expand Down
16 changes: 8 additions & 8 deletions include/linux/nvme.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,26 @@ enum {
* RDMA_QPTYPE field
*/
enum {
NVMF_RDMA_QPTYPE_CONNECTED = 0, /* Reliable Connected */
NVMF_RDMA_QPTYPE_DATAGRAM = 1, /* Reliable Datagram */
NVMF_RDMA_QPTYPE_CONNECTED = 1, /* Reliable Connected */
NVMF_RDMA_QPTYPE_DATAGRAM = 2, /* Reliable Datagram */
};

/* RDMA QP Service Type codes for Discovery Log Page entry TSAS
* RDMA_QPTYPE field
*/
enum {
NVMF_RDMA_PRTYPE_NOT_SPECIFIED = 0, /* No Provider Specified */
NVMF_RDMA_PRTYPE_IB = 1, /* InfiniBand */
NVMF_RDMA_PRTYPE_ROCE = 2, /* InfiniBand RoCE */
NVMF_RDMA_PRTYPE_ROCEV2 = 3, /* InfiniBand RoCEV2 */
NVMF_RDMA_PRTYPE_IWARP = 4, /* IWARP */
NVMF_RDMA_PRTYPE_NOT_SPECIFIED = 1, /* No Provider Specified */
NVMF_RDMA_PRTYPE_IB = 2, /* InfiniBand */
NVMF_RDMA_PRTYPE_ROCE = 3, /* InfiniBand RoCE */
NVMF_RDMA_PRTYPE_ROCEV2 = 4, /* InfiniBand RoCEV2 */
NVMF_RDMA_PRTYPE_IWARP = 5, /* IWARP */
};

/* RDMA Connection Management Service Type codes for Discovery Log Page
* entry TSAS RDMA_CMS field
*/
enum {
NVMF_RDMA_CMS_RDMA_CM = 0, /* Sockets based enpoint addressing */
NVMF_RDMA_CMS_RDMA_CM = 1, /* Sockets based endpoint addressing */
};

#define NVMF_AQ_DEPTH 32
Expand Down

0 comments on commit 8945927

Please sign in to comment.