From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-nvme@lists.infradead.org
Cc: james.smart@broadcom.com, kbusch@kernel.org, hch@lst.de,
Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Subject: [PATCH V2 3/5] nvme-tcp: use helper for ctrl sgl check
Date: Mon, 7 Jun 2021 12:54:52 -0700 [thread overview]
Message-ID: <20210607195454.16829-4-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20210607195454.16829-1-chaitanya.kulkarni@wdc.com>
Use helper to check the controller's SGL support instead of open coding.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
drivers/nvme/host/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 5fc6c568c626..8d279aacb027 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1992,7 +1992,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)) {
dev_err(ctrl->device, "Mandatory sgls are not supported!\n");
goto destroy_admin;
}
--
2.22.1
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2021-06-07 19:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-07 19:54 [PATCH V2 0/5] nvme: small cleanups Chaitanya Kulkarni
2021-06-07 19:54 ` [PATCH V2 1/5] nvme: use helper to remove duplicate code Chaitanya Kulkarni
2021-06-07 19:54 ` [PATCH V2 2/5] nvme-fc: add a helper to check ctrl sgl support Chaitanya Kulkarni
2021-06-08 15:39 ` James Smart
2021-06-07 19:54 ` Chaitanya Kulkarni [this message]
2021-06-07 19:54 ` [PATCH V2 4/5] nvme-pci: use helper for ctrl sgl check Chaitanya Kulkarni
2021-06-07 19:54 ` [PATCH V2 5/5] nvme-pci: remove trailing lines for helpers Chaitanya Kulkarni
2021-06-08 16:48 ` [PATCH V2 0/5] nvme: small cleanups Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210607195454.16829-4-chaitanya.kulkarni@wdc.com \
--to=chaitanya.kulkarni@wdc.com \
--cc=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.