[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>
This commit is contained in:

committed by
Roland Dreier

parent
2aeba9a03b
commit
da6561c285
@@ -575,12 +575,11 @@ static void init_port(struct mthca_dev *dev, int port)
|
||||
|
||||
memset(¶m, 0, sizeof param);
|
||||
|
||||
param.enable_1x = 1;
|
||||
param.enable_4x = 1;
|
||||
param.vl_cap = dev->limits.vl_cap;
|
||||
param.mtu_cap = dev->limits.mtu_cap;
|
||||
param.gid_cap = dev->limits.gid_table_len;
|
||||
param.pkey_cap = dev->limits.pkey_table_len;
|
||||
param.port_width = dev->limits.port_width_cap;
|
||||
param.vl_cap = dev->limits.vl_cap;
|
||||
param.mtu_cap = dev->limits.mtu_cap;
|
||||
param.gid_cap = dev->limits.gid_table_len;
|
||||
param.pkey_cap = dev->limits.pkey_table_len;
|
||||
|
||||
err = mthca_INIT_IB(dev, ¶m, port, &status);
|
||||
if (err)
|
||||
|
Reference in New Issue
Block a user