aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_iba6120.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_iba6120.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_iba6120.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_iba6120.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_iba6120.c b/drivers/infiniband/hw/ipath/ipath_iba6120.c
index 828066e20ad7..a9fc80409e57 100644
--- a/drivers/infiniband/hw/ipath/ipath_iba6120.c
+++ b/drivers/infiniband/hw/ipath/ipath_iba6120.c
@@ -1441,17 +1441,13 @@ static int ipath_pe_early_init(struct ipath_devdata *dd)
1441 dd->ipath_egrtidbase = (u64 __iomem *) 1441 dd->ipath_egrtidbase = (u64 __iomem *)
1442 ((char __iomem *) dd->ipath_kregbase + dd->ipath_rcvegrbase); 1442 ((char __iomem *) dd->ipath_kregbase + dd->ipath_rcvegrbase);
1443 1443
1444 /* 1444 dd->ipath_rcvegrbufsize = ipath_mtu4096 ? 4096 : 2048;
1445 * To truly support a 4KB MTU (for usermode), we need to
1446 * bump this to a larger value. For now, we use them for
1447 * the kernel only.
1448 */
1449 dd->ipath_rcvegrbufsize = 2048;
1450 /* 1445 /*
1451 * the min() check here is currently a nop, but it may not always 1446 * the min() check here is currently a nop, but it may not always
1452 * be, depending on just how we do ipath_rcvegrbufsize 1447 * be, depending on just how we do ipath_rcvegrbufsize
1453 */ 1448 */
1454 dd->ipath_ibmaxlen = min(dd->ipath_piosize2k, 1449 dd->ipath_ibmaxlen = min(ipath_mtu4096 ? dd->ipath_piosize4k :
1450 dd->ipath_piosize2k,
1455 dd->ipath_rcvegrbufsize + 1451 dd->ipath_rcvegrbufsize +
1456 (dd->ipath_rcvhdrentsize << 2)); 1452 (dd->ipath_rcvhdrentsize << 2));
1457 dd->ipath_init_ibmaxlen = dd->ipath_ibmaxlen; 1453 dd->ipath_init_ibmaxlen = dd->ipath_ibmaxlen;