* [PATCH 1/1] nvme-rdma: fix error code in nvme_rdma_setup_ctrl
@ 2021-10-17 8:58 Max Gurtovoy
2021-10-17 9:25 ` Sagi Grimberg
2021-10-18 4:50 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Max Gurtovoy @ 2021-10-17 8:58 UTC (permalink / raw)
To: linux-nvme, hch, kbusch, sagi; +Cc: chaitanyak, israelr, oren, Max Gurtovoy
In case that icdoff is not zero or mandatory keyed sgls are not
supported by the NVMe/RDMA target, we'll go to error flow but we'll
return 0 to the caller. Fix it by returning an appropriate error code.
Fixes: c66e2998c8ca ("nvme-rdma: centralize controller setup sequence")
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
---
drivers/nvme/host/rdma.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 142067d92f02..aa3e142047eb 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1083,11 +1083,13 @@ static int nvme_rdma_setup_ctrl(struct nvme_rdma_ctrl *ctrl, bool new)
return ret;
if (ctrl->ctrl.icdoff) {
+ ret = -EOPNOTSUPP;
dev_err(ctrl->ctrl.device, "icdoff is not supported!\n");
goto destroy_admin;
}
if (!(ctrl->ctrl.sgls & (1 << 2))) {
+ ret = -EOPNOTSUPP;
dev_err(ctrl->ctrl.device,
"Mandatory keyed sgls are not supported!\n");
goto destroy_admin;
--
2.18.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] nvme-rdma: fix error code in nvme_rdma_setup_ctrl
2021-10-17 8:58 [PATCH 1/1] nvme-rdma: fix error code in nvme_rdma_setup_ctrl Max Gurtovoy
@ 2021-10-17 9:25 ` Sagi Grimberg
2021-10-18 4:50 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2021-10-17 9:25 UTC (permalink / raw)
To: Max Gurtovoy, linux-nvme, hch, kbusch; +Cc: chaitanyak, israelr, oren
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] nvme-rdma: fix error code in nvme_rdma_setup_ctrl
2021-10-17 8:58 [PATCH 1/1] nvme-rdma: fix error code in nvme_rdma_setup_ctrl Max Gurtovoy
2021-10-17 9:25 ` Sagi Grimberg
@ 2021-10-18 4:50 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2021-10-18 4:50 UTC (permalink / raw)
To: Max Gurtovoy; +Cc: linux-nvme, hch, kbusch, sagi, chaitanyak, israelr, oren
Thanks,
applied to nvme-5.16.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-18 4:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-17 8:58 [PATCH 1/1] nvme-rdma: fix error code in nvme_rdma_setup_ctrl Max Gurtovoy
2021-10-17 9:25 ` Sagi Grimberg
2021-10-18 4:50 ` Christoph Hellwig
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.