diff options
author | Max Gurtovoy <mgurtovoy@nvidia.com> | 2021-03-31 01:01:19 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-04-02 18:48:28 +0200 |
commit | 73ffcefcfca047e5c13a3f81d2cf22eff18732c1 (patch) | |
tree | caac7ac28686a50ac7341a6620123d36c24eadaf /drivers/nvme | |
parent | nvmet-tcp: enable optional queue idle period tracking (diff) | |
download | linux-73ffcefcfca047e5c13a3f81d2cf22eff18732c1.tar.xz linux-73ffcefcfca047e5c13a3f81d2cf22eff18732c1.zip |
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: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/tcp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index b9e8ea3a7501..8e55d8bc0c50 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1966,6 +1966,11 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new) 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) dev_warn(ctrl->device, "queue_size %zu > ctrl sqsize %u, clamping down\n", |