aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/hw/mthca/mthca_cmd.c11
-rw-r--r--drivers/infiniband/hw/mthca/mthca_main.c3
-rw-r--r--drivers/infiniband/hw/mthca/mthca_provider.c2
3 files changed, 12 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c
index 6966f943f440..09a30dd12b14 100644
--- a/drivers/infiniband/hw/mthca/mthca_cmd.c
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.c
@@ -1255,9 +1255,14 @@ int mthca_QUERY_ADAPTER(struct mthca_dev *dev,
1255 if (err) 1255 if (err)
1256 goto out; 1256 goto out;
1257 1257
1258 MTHCA_GET(adapter->vendor_id, outbox, QUERY_ADAPTER_VENDOR_ID_OFFSET); 1258 if (!mthca_is_memfree(dev)) {
1259 MTHCA_GET(adapter->device_id, outbox, QUERY_ADAPTER_DEVICE_ID_OFFSET); 1259 MTHCA_GET(adapter->vendor_id, outbox,
1260 MTHCA_GET(adapter->revision_id, outbox, QUERY_ADAPTER_REVISION_ID_OFFSET); 1260 QUERY_ADAPTER_VENDOR_ID_OFFSET);
1261 MTHCA_GET(adapter->device_id, outbox,
1262 QUERY_ADAPTER_DEVICE_ID_OFFSET);
1263 MTHCA_GET(adapter->revision_id, outbox,
1264 QUERY_ADAPTER_REVISION_ID_OFFSET);
1265 }
1261 MTHCA_GET(adapter->inta_pin, outbox, QUERY_ADAPTER_INTA_PIN_OFFSET); 1266 MTHCA_GET(adapter->inta_pin, outbox, QUERY_ADAPTER_INTA_PIN_OFFSET);
1262 1267
1263 get_board_id(outbox + QUERY_ADAPTER_VSD_OFFSET / 4, 1268 get_board_id(outbox + QUERY_ADAPTER_VSD_OFFSET / 4,
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;
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index 19b7f61cf04c..9e491df6419c 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -1256,6 +1256,8 @@ static int mthca_init_node_data(struct mthca_dev *dev)
1256 goto out; 1256 goto out;
1257 } 1257 }
1258 1258
1259 if (mthca_is_memfree(dev))
1260 dev->rev_id = be32_to_cpup((__be32 *) (out_mad->data + 32));
1259 memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); 1261 memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8);
1260 1262
1261out: 1263out: