diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2008-01-27 11:13:20 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-02-04 23:20:43 -0500 |
commit | 6ccef1de2c1718729dd1c7ee8bd98473519eb3b3 (patch) | |
tree | 7685f0b85ce22ae65ea95a4af9771e03ec6206ad /drivers/infiniband/hw/mthca/mthca_main.c | |
parent | 7bc531dd883b955e6198c8e202161f22d2e8c472 (diff) |
IB/mthca: Don't read reserved fields in mthca_QUERY_ADAPTER()
For memfree devices, the firmware QUERY_ADAPTER command does not
return vendor_id, device_id, and revision_id; do not return these
fields in the QUERY_ADAPTER function for memfree devices.
Instead, for memfree devices, initialize the rev_id field of the mthca
device via init_node_data (MAD IFC query), as is done in the
query_device verb implementation.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_main.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 5cf8250d4e16..e3bd71a3aa93 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -735,7 +735,8 @@ static int mthca_init_hca(struct mthca_dev *mdev) | |||
735 | } | 735 | } |
736 | 736 | ||
737 | mdev->eq_table.inta_pin = adapter.inta_pin; | 737 | mdev->eq_table.inta_pin = adapter.inta_pin; |
738 | mdev->rev_id = adapter.revision_id; | 738 | if (!mthca_is_memfree(mdev)) |
739 | mdev->rev_id = adapter.revision_id; | ||
739 | memcpy(mdev->board_id, adapter.board_id, sizeof mdev->board_id); | 740 | memcpy(mdev->board_id, adapter.board_id, sizeof mdev->board_id); |
740 | 741 | ||
741 | return 0; | 742 | return 0; |