aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@mellanox.co.il>2005-10-01 13:09:44 -0700
committerRoland Dreier <rolandd@cisco.com>2005-10-17 15:20:26 -0700
commit9825051e8c81cbd4400333e7cdc04be77a0bab75 (patch)
tree0b14750f603b1feece6c147cb95f31619bfb67c2
parent274c0891637c44ac71f3ac40be91b43c2318883a (diff)
[IB] mthca: Fill in more fields in query_port method
Add code to fill in the bad_pkey_cntr, max_mtu, active_mtu and subnet_timeout fields in mthca_query_port(). Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--drivers/infiniband/hw/mthca/mthca_provider.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index 939b09dcfe0..4e87ad11571 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -152,9 +152,13 @@ static int mthca_query_port(struct ib_device *ibdev,
props->gid_tbl_len = to_mdev(ibdev)->limits.gid_table_len;
props->max_msg_sz = 0x80000000;
props->pkey_tbl_len = to_mdev(ibdev)->limits.pkey_table_len;
+ props->bad_pkey_cntr = be16_to_cpup((__be16 *) (out_mad->data + 46));
props->qkey_viol_cntr = be16_to_cpup((__be16 *) (out_mad->data + 48));
props->active_width = out_mad->data[31] & 0xf;
props->active_speed = out_mad->data[35] >> 4;
+ props->max_mtu = out_mad->data[41] & 0xf;
+ props->active_mtu = out_mad->data[36] >> 4;
+ props->subnet_timeout = out_mad->data[51] & 0x1f;
out:
kfree(in_mad);