[IB] mthca: fix hw_ver value returned from mthca_query_device
authorJack Morgenstein <jackm@mellanox.co.il>
Tue, 27 Sep 2005 20:54:44 +0000 (13:54 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 27 Sep 2005 20:54:44 +0000 (13:54 -0700)
The IB spec defines the field to be 32 bits, not 16 bits.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_provider.c

index 1c1c2e230871202fe4b57bcf26aa602e6b505586..3f5319a46577022378e1142ff2dbaa13bd42a71a 100644 (file)
@@ -84,7 +84,7 @@ static int mthca_query_device(struct ib_device *ibdev,
        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);