diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2014-05-20 12:28:11 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-05-20 20:18:44 +0200 |
commit | 5f80ff8eccba50832dcc640ac89add4c7fced963 (patch) | |
tree | c861a3a53164dd5041bdc2f1df49460df608c826 /drivers/infiniband | |
parent | Target/iser: Wait for proper cleanup before unloading (diff) | |
download | linux-5f80ff8eccba50832dcc640ac89add4c7fced963.tar.xz linux-5f80ff8eccba50832dcc640ac89add4c7fced963.zip |
Target/iser: Gracefully reject T10-PI enabled connect request if not supported
In case user chose to set T10-PI enable on the target while
the IB device does not support it, gracefully reject the request.
Reported-by: Slava Shwartsman <valyushash@gmail.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: stable@vger.kernel.org # 3.15+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index c68795194e25..b622783ab198 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -663,8 +663,9 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event) pi_support = np->tpg_np->tpg->tpg_attrib.t10_pi; if (pi_support && !device->pi_capable) { - pr_err("Protection information requested but not supported\n"); - ret = -EINVAL; + pr_err("Protection information requested but not supported, " + "rejecting connect request\n"); + ret = rdma_reject(cma_id, NULL, 0); goto out_mr; } |