From: Chaitanya Kulkarni Date: Thu, 10 Jun 2021 01:28:26 +0000 (-0700) Subject: nvme-tcp: use ctrl sgl check helper X-Git-Tag: for-5.14/drivers-2021-06-29^2~25 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=3b54064fbce73a4dada6019dd400f0ce28ab5eb9;p=linux-block.git nvme-tcp: use ctrl sgl check helper Use the helper to check NVMe controller's SGL support. Reviewed-by: Sagi Grimberg Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig --- diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 6a65b0516180..c7bd37103cf4 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1993,7 +1993,7 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new) goto destroy_admin; } - if (!(ctrl->sgls & ((1 << 0) | (1 << 1)))) { + if (!nvme_ctrl_sgl_supported(ctrl)) { ret = -EOPNOTSUPP; dev_err(ctrl->device, "Mandatory sgls are not supported!\n"); goto destroy_admin;