aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorJon Mason <jon@opengridcomputing.com>2008-09-30 17:51:19 -0400
committerRoland Dreier <rolandd@cisco.com>2008-09-30 17:51:19 -0400
commitc752c78275fbf3fcb1d6d0af9b03ac999fe1963d (patch)
tree85c8332c2197b68e53fff1de31eb8dc912d9da11 /drivers/infiniband
parent9824b8f11373b0df806c135a342da9319ef1d893 (diff)
RDMA/cxgb3: Set active_mtu in ib_port_attr
When running ibv_devinfo, the active_mtu returned is garbage. This is due to the field not being populated in the query_port function in the driver. The patch below populates the active_mtu field with a MTU of 2k. It also zeros the struct, so that any new additions to it will return 0. Signed-off-by: Jon Mason <jon@opengridcomputing.com> Acked-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_provider.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
index eb778bfd6f66..ecff98043589 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
@@ -1155,13 +1155,11 @@ static int iwch_query_port(struct ib_device *ibdev,
1155 u8 port, struct ib_port_attr *props) 1155 u8 port, struct ib_port_attr *props)
1156{ 1156{
1157 PDBG("%s ibdev %p\n", __func__, ibdev); 1157 PDBG("%s ibdev %p\n", __func__, ibdev);
1158
1159 memset(props, 0, sizeof(struct ib_port_attr));
1158 props->max_mtu = IB_MTU_4096; 1160 props->max_mtu = IB_MTU_4096;
1159 props->lid = 0; 1161 props->active_mtu = IB_MTU_2048;
1160 props->lmc = 0;
1161 props->sm_lid = 0;
1162 props->sm_sl = 0;
1163 props->state = IB_PORT_ACTIVE; 1162 props->state = IB_PORT_ACTIVE;
1164 props->phys_state = 0;
1165 props->port_cap_flags = 1163 props->port_cap_flags =
1166 IB_PORT_CM_SUP | 1164 IB_PORT_CM_SUP |
1167 IB_PORT_SNMP_TUNNEL_SUP | 1165 IB_PORT_SNMP_TUNNEL_SUP |
@@ -1170,7 +1168,6 @@ static int iwch_query_port(struct ib_device *ibdev,
1170 IB_PORT_VENDOR_CLASS_SUP | IB_PORT_BOOT_MGMT_SUP; 1168 IB_PORT_VENDOR_CLASS_SUP | IB_PORT_BOOT_MGMT_SUP;
1171 props->gid_tbl_len = 1; 1169 props->gid_tbl_len = 1;
1172 props->pkey_tbl_len = 1; 1170 props->pkey_tbl_len = 1;
1173 props->qkey_viol_cntr = 0;
1174 props->active_width = 2; 1171 props->active_width = 2;
1175 props->active_speed = 2; 1172 props->active_speed = 2;
1176 props->max_msg_sz = -1; 1173 props->max_msg_sz = -1;