forked from luck/tmp_suning_uos_patched
Merge branch 'nvme-4.11-rc' of git://git.infradead.org/nvme into for-linus
Sagi writes: We have one spec mis-match fix from Roland and several sparse fixes from Christoph.
This commit is contained in:
commit
8945927cb7
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user