aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_qp.c
diff options
context:
space:
mode:
authorDave Olson <dave.olson@qlogic.com>2008-04-17 00:01:12 -0400
committerRoland Dreier <rolandd@cisco.com>2008-04-17 00:01:12 -0400
commit826d801009fb3c82832f2d92149446cce354bf61 (patch)
tree564534dee75be00b019b78b130ec6eb7e5a81e7d /drivers/infiniband/hw/ipath/ipath_qp.c
parent5d1ce03dd335abaef50dc615137cac2a22c5cee0 (diff)
IB/ipath: Enable 4KB MTU
Enable use of 4KB MTU. Since the driver uses more pinned memory for receive buffers when the 4KB MTU is enabled, whether or not the fabric supports that MTU, add a "mtu4096" module parameter that can be used to limit the MTU to 2KB when it is known that 4KB MTUs can't be used anyway. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_qp.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_qp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c
index 087ed3166479..5c8094a03643 100644
--- a/drivers/infiniband/hw/ipath/ipath_qp.c
+++ b/drivers/infiniband/hw/ipath/ipath_qp.c
@@ -516,13 +516,13 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
516 goto inval; 516 goto inval;
517 517
518 /* 518 /*
519 * Note: the chips support a maximum MTU of 4096, but the driver 519 * don't allow invalid Path MTU values or greater than 2048
520 * hasn't implemented this feature yet, so don't allow Path MTU 520 * unless we are configured for a 4KB MTU
521 * values greater than 2048.
522 */ 521 */
523 if (attr_mask & IB_QP_PATH_MTU) 522 if ((attr_mask & IB_QP_PATH_MTU) &&
524 if (attr->path_mtu > IB_MTU_2048) 523 (ib_mtu_enum_to_int(attr->path_mtu) == -1 ||
525 goto inval; 524 (attr->path_mtu > IB_MTU_2048 && !ipath_mtu4096)))
525 goto inval;
526 526
527 if (attr_mask & IB_QP_PATH_MIG_STATE) 527 if (attr_mask & IB_QP_PATH_MIG_STATE)
528 if (attr->path_mig_state != IB_MIG_MIGRATED && 528 if (attr->path_mig_state != IB_MIG_MIGRATED &&