diff options
author | Roland Dreier <roland@eddore.topspincom.com> | 2005-08-17 10:39:10 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-08-26 23:37:36 -0400 |
commit | da6561c285a6e28a075b97fd5a1560a2b0ce843e (patch) | |
tree | f39c9f1529e3c8aede42490d67a75321a8d8a25e /drivers/infiniband/hw/mthca/mthca_cmd.c | |
parent | 2aeba9a03b0d249fc710b9939fc089ce53d8cd30 (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_cmd.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_cmd.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c index e15c1e2deab4..c258c1b7022e 100644 --- a/drivers/infiniband/hw/mthca/mthca_cmd.c +++ b/drivers/infiniband/hw/mthca/mthca_cmd.c | |||
@@ -1282,10 +1282,8 @@ int mthca_INIT_IB(struct mthca_dev *dev, | |||
1282 | #define INIT_IB_FLAG_SIG (1 << 18) | 1282 | #define INIT_IB_FLAG_SIG (1 << 18) |
1283 | #define INIT_IB_FLAG_NG (1 << 17) | 1283 | #define INIT_IB_FLAG_NG (1 << 17) |
1284 | #define INIT_IB_FLAG_G0 (1 << 16) | 1284 | #define INIT_IB_FLAG_G0 (1 << 16) |
1285 | #define INIT_IB_FLAG_1X (1 << 8) | ||
1286 | #define INIT_IB_FLAG_4X (1 << 9) | ||
1287 | #define INIT_IB_FLAG_12X (1 << 11) | ||
1288 | #define INIT_IB_VL_SHIFT 4 | 1285 | #define INIT_IB_VL_SHIFT 4 |
1286 | #define INIT_IB_PORT_WIDTH_SHIFT 8 | ||
1289 | #define INIT_IB_MTU_SHIFT 12 | 1287 | #define INIT_IB_MTU_SHIFT 12 |
1290 | #define INIT_IB_MAX_GID_OFFSET 0x06 | 1288 | #define INIT_IB_MAX_GID_OFFSET 0x06 |
1291 | #define INIT_IB_MAX_PKEY_OFFSET 0x0a | 1289 | #define INIT_IB_MAX_PKEY_OFFSET 0x0a |
@@ -1301,12 +1299,11 @@ int mthca_INIT_IB(struct mthca_dev *dev, | |||
1301 | memset(inbox, 0, INIT_IB_IN_SIZE); | 1299 | memset(inbox, 0, INIT_IB_IN_SIZE); |
1302 | 1300 | ||
1303 | flags = 0; | 1301 | flags = 0; |
1304 | flags |= param->enable_1x ? INIT_IB_FLAG_1X : 0; | ||
1305 | flags |= param->enable_4x ? INIT_IB_FLAG_4X : 0; | ||
1306 | flags |= param->set_guid0 ? INIT_IB_FLAG_G0 : 0; | 1302 | flags |= param->set_guid0 ? INIT_IB_FLAG_G0 : 0; |
1307 | flags |= param->set_node_guid ? INIT_IB_FLAG_NG : 0; | 1303 | flags |= param->set_node_guid ? INIT_IB_FLAG_NG : 0; |
1308 | flags |= param->set_si_guid ? INIT_IB_FLAG_SIG : 0; | 1304 | flags |= param->set_si_guid ? INIT_IB_FLAG_SIG : 0; |
1309 | flags |= param->vl_cap << INIT_IB_VL_SHIFT; | 1305 | flags |= param->vl_cap << INIT_IB_VL_SHIFT; |
1306 | flags |= param->port_width << INIT_IB_PORT_WIDTH_SHIFT; | ||
1310 | flags |= param->mtu_cap << INIT_IB_MTU_SHIFT; | 1307 | flags |= param->mtu_cap << INIT_IB_MTU_SHIFT; |
1311 | MTHCA_PUT(inbox, flags, INIT_IB_FLAGS_OFFSET); | 1308 | MTHCA_PUT(inbox, flags, INIT_IB_FLAGS_OFFSET); |
1312 | 1309 | ||