Commit d56ae18f authored by Max Gurtovoy's avatar Max Gurtovoy Committed by Christoph Hellwig

nvmet: use macro definitions for setting cmic value

This makes the code more readable.
Signed-off-by: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 571b5444
...@@ -385,7 +385,8 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req) ...@@ -385,7 +385,8 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
*/ */
/* we support multiple ports, multiples hosts and ANA: */ /* we support multiple ports, multiples hosts and ANA: */
id->cmic = (1 << 0) | (1 << 1) | (1 << 3); id->cmic = NVME_CTRL_CMIC_MULTI_PORT | NVME_CTRL_CMIC_MULTI_CTRL |
NVME_CTRL_CMIC_ANA;
/* Limit MDTS according to transport capability */ /* Limit MDTS according to transport capability */
if (ctrl->ops->get_mdts) if (ctrl->ops->get_mdts)
......
...@@ -320,6 +320,7 @@ struct nvme_id_ctrl { ...@@ -320,6 +320,7 @@ struct nvme_id_ctrl {
}; };
enum { enum {
NVME_CTRL_CMIC_MULTI_PORT = 1 << 0,
NVME_CTRL_CMIC_MULTI_CTRL = 1 << 1, NVME_CTRL_CMIC_MULTI_CTRL = 1 << 1,
NVME_CTRL_CMIC_ANA = 1 << 3, NVME_CTRL_CMIC_ANA = 1 << 3,
NVME_CTRL_ONCS_COMPARE = 1 << 0, NVME_CTRL_ONCS_COMPARE = 1 << 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment