aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>2021-06-09 18:28:26 -0700
committerChristoph Hellwig <hch@lst.de>2021-06-17 15:51:19 +0200
commit3b54064fbce73a4dada6019dd400f0ce28ab5eb9 (patch)
tree844d12ed9c810385b5df8b6f9ea4e5064a8d8cda /drivers/nvme
parentnvme-pci: use ctrl sgl check helper (diff)
downloadlinux-dev-3b54064fbce73a4dada6019dd400f0ce28ab5eb9.tar.xz
linux-dev-3b54064fbce73a4dada6019dd400f0ce28ab5eb9.zip
nvme-tcp: use ctrl sgl check helper
Use the helper to check NVMe controller's SGL support. Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-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.c2
1 files changed, 1 insertions, 1 deletions
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;