aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorNaga Irrinki <naga.irrinki@avagotech.com>2015-05-19 02:02:39 -0400
committerDoug Ledford <dledford@redhat.com>2015-05-18 10:25:24 -0400
commit72d8a013d75fc845a34451bdce3d3a3dd97488f1 (patch)
tree623ad182c82fc9cab8678bdc5beb702fe7357a84 /drivers/infiniband
parentd27b2f15eb535b4f02a75070108c08cefb540257 (diff)
RDMA/ocrdma: Fail connection for MTU lesser than 512
HW currently restricts the IB MTU range between 512 and 4096. Fail connection for MTUs lesser than 512. Signed-off-by: Naga Irrinki <naga.irrinki@avagotech.com> Signed-off-by: Selvin Xavier <selvin.xavier@avagotech.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_hw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index ac7347ad90be..47615ff33bc6 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -2534,8 +2534,10 @@ static int ocrdma_set_qp_params(struct ocrdma_qp *qp,
2534 cmd->flags |= OCRDMA_QP_PARA_DST_QPN_VALID; 2534 cmd->flags |= OCRDMA_QP_PARA_DST_QPN_VALID;
2535 } 2535 }
2536 if (attr_mask & IB_QP_PATH_MTU) { 2536 if (attr_mask & IB_QP_PATH_MTU) {
2537 if (attrs->path_mtu < IB_MTU_256 || 2537 if (attrs->path_mtu < IB_MTU_512 ||
2538 attrs->path_mtu > IB_MTU_4096) { 2538 attrs->path_mtu > IB_MTU_4096) {
2539 pr_err("ocrdma%d: IB MTU %d is not supported\n",
2540 dev->id, ib_mtu_enum_to_int(attrs->path_mtu));
2539 status = -EINVAL; 2541 status = -EINVAL;
2540 goto pmtu_err; 2542 goto pmtu_err;
2541 } 2543 }