[openib-general] [PATCH] fix hw_ver value in ib/v_query_device

Jack Morgenstein jackm at mellanox.co.il
Tue Sep 27 06:09:10 PDT 2005


The patch below fixes the incorrect value returned for the 
hw_ver field in ib/v_query_device.

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 3560)
+++ linux-kernel/infiniband/hw/mthca/mthca_provider.c	(working copy)
@@ -84,7 +84,7 @@
 	props->vendor_id           = be32_to_cpup((__be32 *) (out_mad->data + 36)) &
 		0xffffff;
 	props->vendor_part_id      = be16_to_cpup((__be16 *) (out_mad->data + 30));
-	props->hw_ver              = be16_to_cpup((__be16 *) (out_mad->data + 32));
+	props->hw_ver              = be32_to_cpup((__be32 *) (out_mad->data + 32));
 	memcpy(&props->sys_image_guid, out_mad->data +  4, 8);
 	memcpy(&props->node_guid,      out_mad->data + 12, 8);
 



More information about the general mailing list