aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_qp.c
diff options
context:
space:
mode:
authorRoland Dreier <roland@eddore.topspincom.com>2005-08-17 10:39:10 -0400
committerRoland Dreier <rolandd@cisco.com>2005-08-26 23:37:36 -0400
commitda6561c285a6e28a075b97fd5a1560a2b0ce843e (patch)
treef39c9f1529e3c8aede42490d67a75321a8d8a25e /drivers/infiniband/hw/mthca/mthca_qp.c
parent2aeba9a03b0d249fc710b9939fc089ce53d8cd30 (diff)
[PATCH] IB/mthca: Use correct port width capability value
When we call the INIT_IB firmware command to bring up a port, use the actual port width capability returned by the QUERY_DEV_LIM command instead of always trying to enable both 1X and 4X. This fixes breakage seen when the firmware is build to allow 4X only. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_qp.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_qp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c
index 8fbb4f1f5398..b7e3d2342799 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -575,12 +575,11 @@ static void init_port(struct mthca_dev *dev, int port)
575 575
576 memset(&param, 0, sizeof param); 576 memset(&param, 0, sizeof param);
577 577
578 param.enable_1x = 1; 578 param.port_width = dev->limits.port_width_cap;
579 param.enable_4x = 1; 579 param.vl_cap = dev->limits.vl_cap;
580 param.vl_cap = dev->limits.vl_cap; 580 param.mtu_cap = dev->limits.mtu_cap;
581 param.mtu_cap = dev->limits.mtu_cap; 581 param.gid_cap = dev->limits.gid_table_len;
582 param.gid_cap = dev->limits.gid_table_len; 582 param.pkey_cap = dev->limits.pkey_table_len;
583 param.pkey_cap = dev->limits.pkey_table_len;
584 583
585 err = mthca_INIT_IB(dev, &param, port, &status); 584 err = mthca_INIT_IB(dev, &param, port, &status);
586 if (err) 585 if (err)