Commit 73ffcefc authored by Max Gurtovoy's avatar Max Gurtovoy Committed by Christoph Hellwig

nvme-tcp: check sgl supported by target

SGLs support is mandatory for NVMe/tcp, make sure that the target is
aligned to the specification.
Signed-off-by: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent d8e7b462
...@@ -1966,6 +1966,11 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new) ...@@ -1966,6 +1966,11 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)
goto destroy_admin; goto destroy_admin;
} }
if (!(ctrl->sgls & ((1 << 0) | (1 << 1)))) {
dev_err(ctrl->device, "Mandatory sgls are not supported!\n");
goto destroy_admin;
}
if (opts->queue_size > ctrl->sqsize + 1) if (opts->queue_size > ctrl->sqsize + 1)
dev_warn(ctrl->device, dev_warn(ctrl->device,
"queue_size %zu > ctrl sqsize %u, clamping down\n", "queue_size %zu > ctrl sqsize %u, clamping down\n",
......
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