nvme-rdma: correctly check for target keyed sgl support
authorSteve Wise <swise@opengridcomputing.com>
Tue, 5 Jun 2018 17:16:41 +0000 (10:16 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 8 Jun 2018 18:51:10 +0000 (12:51 -0600)
The code was checking bit 20 instead of bit 2.  Also fixed the log entry.

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/rdma.c

index 7b3f084104304d2f8f8b77597ca09d79df487889..2aba03876d846a4bc47a3216dab864ec5c0df2d0 100644 (file)
@@ -1951,8 +1951,9 @@ static struct nvme_ctrl *nvme_rdma_create_ctrl(struct device *dev,
        }
 
        /* sanity check keyed sgls */
-       if (!(ctrl->ctrl.sgls & (1 << 20))) {
-               dev_err(ctrl->ctrl.device, "Mandatory keyed sgls are not support\n");
+       if (!(ctrl->ctrl.sgls & (1 << 2))) {
+               dev_err(ctrl->ctrl.device,
+                       "Mandatory keyed sgls are not supported!\n");
                ret = -EINVAL;
                goto out_remove_admin_queue;
        }