[openib-general] [PATCH] [mthca]: fixed fields in query_port

Jack Morgenstein jackm at mellanox.co.il
Wed Sep 28 06:41:07 PDT 2005


Still need to fix up max_vl_num (with this fix, the encoded value is returned).
Should change this field to an enumerated type in struct ib_port_attr.
My next patch will do this (in user level as well).

Jack

Signed-off-by: Jack Morgenstein <jackm at mellanox.co.il>

Index: linux-kernel/infiniband/hw/mthca/mthca_provider.c
===================================================================
--- linux-kernel/infiniband/hw/mthca/mthca_provider.c	(revision 3590)
+++ linux-kernel/infiniband/hw/mthca/mthca_provider.c	(working copy)
@@ -152,9 +152,14 @@
 	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->max_vl_num        = out_mad->data[37] >> 4;
+	props->subnet_timeout    = out_mad->data[51] & 0x1f;
 
  out:
 	kfree(in_mad);




More information about the general mailing list